After a bit of tinkering around, I've noticed it happened because I hit the \ key and the enter key simultaneously. I noticed it happened because of kitty.
After upgrading kitty from 0.37.0 to 0.39.1, I can safely say the problem seem to be fixed.