Today I was killed while holding mouse1. when i respawned the spawn selection map was open and my weapon was firing though i did not press the button until i closed the selection screen.
It's the same as when you hold down the fire button on your engy tool and press tab (or any VGUI button), then release fire, then release tab and it automatically repairs buildings.
I always get class selection screen after I die, it's annoying because I often want to know from where was I shot
That is indeed the fault. This usually happens to me like this: I die I hit spawn selection Choose a spawn, click on it. It says "Click to Spawn" and I click, but the Spawn Selection window either disappears and reappears or is persistent into spawning, and I'm firing my gun. I have to hit enter, then click, and I stop firing.