Xmodmap not working

I run xmodmap -pke > ./default, then run xmodmap ./default, and plasma freezes. Once plasma unfreezes, my keyboard works for a bit, but then my keyboard stops working. Restarting plasma fixes it.

If I change the mapping, the mapping works until my keyboard stops working. Once I restart plasma, the map is reset to default.

KDE Neon 6.0
KDE Plasma 6.0.4
X11