Welcome to the community.
As stated in several posts in this thread, PayDay 2 has a pretty badly designed game engine. The game was abandoned by the devs for some time due to finance issues, which is why there are so many unfixed bugs in the game, including the taser crash.
Players will occasionally crash when hit by a taser whether they use mods, trainers or not. However, using mods or trainers may increase the chances of crashing. But ultimately the issue is within the game engine itself, which is up to the game’s developers to fix, once they sort out their financial issues. Though I believe their main focus right now is on developing a new game, PayDay 3.