Its never crashed mine. Did you have other codes on?
Its happens when I use only that one code by itself.
When I used another code like "walls don't break underground" it doesn't crash the game.
It also crashes the game whenever I try to evolve a non shiny pokemon with the code on until I reboot with the code off. Then it works properly again. Maybe there are no cases in the code to handle a situation like that? It specifically either perpetually blackscreens or freezes and crashes when the evolved model is spawned.
The code works, just an oddity I've encountered around specific pokemon like Evolving a shiny nincada into a Shedinja or Ninjask or a normal vibrava into a flygon. Every other pokemon is fine.