No idea how to fix. RIP. I tried crazy shit like sending the HP stat as the negative dex number of the original pokemon (so like Mew would return -151 for HP). Values under 0 would be flipped and turn into a dex number to get the stat every time the tooltip updated. I think that was the closest I was able to get to something that might have worked (but it didn't). As far as transformation and forme changes go, everything is registered as a "permanent" change. This was the best solution as it fixed so many other things but only left Ditto and Mew's HP incorrect if they transformed.