Hmm I was going through a fast this time last year and experienced something that sounds similar. It was hard to focus on anything and often I would think about what I’d be eating next.
I found that breaking meals up and having 1 medium sized meal and 4-5 smaller snacks throughout the day helped. This allowed me to sustain energy throughout the day (not sure if real energy or placebo) and get back to other things. Obviously this won’t work if you’re doing intermittent fasting or something like that.