Losing to a NPC can deduct/take away 10% of your pd balance
(Though from boss, its only Team Rocket boss which does so)
If we calculate your money loss from 1m 200k to 9m 600+k
Losing to a npc is pretty much the case here :/
Not a glitch bro, try to be careful next time :)
Good Luck!