That's easily solved: make that either be "interruptible" or an indicator if you are in "deep focus" or not.
However, one does not always plan in advance to get into deep focus, so I don't really believe this problem is solveable in a useful way. Basically, we need to learn to regain focus quickly and push people away when busy.
Also, async interrupt methods are great when used properly: don't you hate it when someone pings you with "hi" or "hi, I have a question" or similar and waits for your response? Good practice is to ask a full question which allows the other side to respond when they can without interrupting.
You'd need to have it be host specific. Stack overflow? You're researching a problem and still might be elbows deep in a problem. Bluesky or FB? Not so much.
I was being glib and using this as basically a way of illustrating how this isn't really a practical solution. I know when I'm working hard on a difficult the "endless googling bizarre behavior" is when I'm least ready to help field ad hoc requests.