There's an interesting hack that works for a lot of people, including me- I've even included it in Study Swami: Keep a time log. Just log what you are doing throughout the day (I also log when my concentration breaks). You only need to do it a couple of times and, just like a food log when you are dieting, you will automatically power through your distractions because you don't want an embarrassing log entry.
It really works, and in a couple of days you'll likely have your focus back.
I started doing this "how long can I concentrate for" game in grad school in the 80s, and tried it again a few years ago when I was struggling. My concentration span started at a super-embarrassing couple of minutes at a time. In a couple of days I was back in the hour range, and before long it was as long as I needed. These days I, like you, seldom have tremendously long blocks like 4 hours available. But I effectively use what I can.
It really works, and in a couple of days you'll likely have your focus back.
I started doing this "how long can I concentrate for" game in grad school in the 80s, and tried it again a few years ago when I was struggling. My concentration span started at a super-embarrassing couple of minutes at a time. In a couple of days I was back in the hour range, and before long it was as long as I needed. These days I, like you, seldom have tremendously long blocks like 4 hours available. But I effectively use what I can.