I randomized the game and I was fighting a Lucario that held a Lucarionite and Mega Evolved mid-battle (it was NOT mega evolved when sent out). I killed it and then it became a regular Lucario but no model was there and I was stuck.
So, a pokemon that can mega evolve, holding their correct mega stone, can cause insane glitches.
Copy of his pokemon here:
Lucario (Lv. 7) @Lucarionite (Nature: Mild) (Moves: Sparkling Aria/Foresight/Misty Terrain/Hypnosis) IVs: 15/15/15/15/15/15 EVs: 0/0/0/0/0/0
Citra_Nightly_1550___Pokémon_Ultra_Moon_2020-05-26_22-43-32.mp4