I think we’ve all been in this place!
I don’t know what your personality is like, so I don’t know if my approaches will necessarily work for you.
When I get squirrley behavior during schooltime, I first sit the kid(s) down and say, “Look, this isn’t working for me. I am trying to accomplish such-and-such and your behavior is getting in the way. It needs to stop. When you were a toddler, I was patient with this behavior from you because you were little, but now you are too old to act like this. Stop. Now.” At age 11, this straight-forward talk might make him listen.
A reminder before schoolwork can help. “We’re doing schoolwork for the next hour. No crazy behavior, got it?”
I have been known to shut the book while reading to disobeying kids and quietly say, “Go now. Leave the room. I can’t work with you like this.” They look at me dumfounded and I say again, “Leave. We cannot do schoolwork under these conditions. I refuse to continue.” They tend to be on their very best behavior after an episode like this. There is something powerful about a mother’s quiet and firm disappointment that is more effective than loud anger or punishment.
On occassion I’ve asked my DH to talk to my son about obeying his mother (me!). I don’t over-do this approach, but it does help to remind the kids that DH and I are a team. They need to know that disobeying mom will never go over well with dad.
Looking at the big picture, I notice my kids (especially my son) gets disruptive and squirrly when he doesn’t have enough other WORK to do. I’d consider looking at your son’s chores and adding to them, especially physical chores. I don’t like to use chores as a threat or punishment because I don’t like the idea of work as being unpleasant. (All types of honest work should be enjoyed at some level, imo, but that is another topic.) Increasing his responsibilities and contributions to the household might help his behavior during schooltime.
Good luck. Be kind to yourself. We all face challenging days…or stretches of days.
Adding this edit: Speaking of physical work, you might take a couple of weeks off schoolwork and concentrate on big chores that need to be done around the house and break the routine of disobedience during schooltime. Assign some big chores to your son. And then maybe take another few days for outdoor physical days before hitting the books again. I thoroughly believe that boys in particular need to be physically active, much more than we moms sometimes realize. Boys can certainly sit for an hour or more of schoolwork every day, but fill the rest of their day with physical activities and responsibilities as much as you can. (Unless they are reading a book…then leave ’em alone!)