You'd have to do that on a real Mac anyhow. Mac Minis, iMacs, and Mac Studios don't pair BT mice unless logged in, unless they use a USB receiver.
I use a Steam Deck. You can switch from Gaming Mode to Desktop Mode with just one button press in the main menu
macOS lets you switch to Windows with one button press in Boot Camp
It's not complicated like you think it is lmao.
That's not how computers work at all lmao. macOS mode wouldn't stop if a keyboard or mouse got disconnected or if it was removed from it's Magic Keyboard. All that would happen is you wouldn't type anything or move a cursor. Like with Sidecar mode the touchscreen would be a failsafe to open a menu to exit macOS mode should the need arise. You're trying to make an issue out of something that isn't an issue.
This is you:
It is for Intel Macs especially with virtual memory
My guy do you not know how dualbooting works?