This drives me nuts as well, the number of times I close a tab with C-W, or select all with C-A...
My brain can "switch mode" when on a regular web page, but if I open some kind of "terminal in a page" (i.e. I the AWS console), then I'm 100% it will end up with a C-W.
For me, it happens most often when I have a call open in a browser in one window, and a terminal open on the other half of the screen taking notes, and then switch to the call and start typing something in the chat.
My brain can "switch mode" when on a regular web page, but if I open some kind of "terminal in a page" (i.e. I the AWS console), then I'm 100% it will end up with a C-W.