I encountered a bug just recently while playing with Boss battles. This bug is when killing the boss final remaining pokemon with hazards(stealth rocks,spikes), it automatically lost the battle and recorded as lost.
I'm hoping actions will be taken. I will be waiting to see ur implementations.
Hope I will receive the best necesarry adjustment for my account. Thanks.