the causes all sound really random, but one thing that struck me was the fact that the game crashed while changing your sens. Are you on Wayland by any chance? It might be possible that libSDL2 has some issues setting the sens on Wayland, so the game thus crashes. if you are on Wayland, try using this envvar to run TF2's SDL2 stuff in a Xorg server (Xwayland):
SDL_VIDEODRIVER=x11