I am having this same issue in 1.21.5 where after removing the trait mod, if players were using any of the non-vanilla classes, hitting the traits button will result in a sudden crash of the game. In game when I run the "/player name allowcharselonce" causes my own crash as I was a lumberjack. My one server member who chose blackguard is able to hit this trait button but players who were using the modded classes arent able to even change their class and I haven't a clue what to do.