if the view doesn't get obstructed and you could simply tap F1 a second time (or Esc) and instantly be back to what you were doing, i think the UX problem would be solved.
in firefox, i sometimes hit F12 on accident -- but i can just tap it again to close the dev tools, even if it hasn't finished loading. that's decent UX.
The only proper and decent UX in this case is to remove the source of the error. You do that by removing the binding of F1
this is the problem. and it breaks the user's flow because it obscures the work area and can't be instantly dismissed.
there's nothing wrong with putting relatively uncommon actions next to common actions on the keyboard as long as the actions don't break the user's flow.
This. Yet you propose to keep the action that breaks the user flow even if it's often triggered by mistake ;)
I propose to remove the action that breaks the user flow.
And this software is called "Excel". This should really be solved in software called "Excel". As in: remove functionality from F1