Not exactly a bug, but more of an oversight : since dynamaxed attacks are listed as different from the normal ones, they can trigger the illusion warning (which I didn't know about actually, very nice thinking). It might be possible Z-moves follow the same behavior, I didn't check.