The feat Great Weapon Master (PHB, pg. 167) includes the following benefit:
On your turn, when you score a critical hit with a melee weapon or reduce a creature to 0 hit points with one, you can make one melee weapon attack as a bonus action.
If a PC with this feat (let's say they're no higher than level 4 as so not to complicate this question with Extra Attack) attacks and successfully hits, say, a druid who has Wild Shaped into a frog (1 hp), or they have been polymorphed into a frog. This attack will reduce the hp of the frog to 0. Let's assume the druid has enough hp to survive the remaining damage carried over to their normal form.
From polymorph (PHB, pg. 266):
If it reverts as a result of dropping to 0 hit points, any excess damage carries over to its normal form. As long as the excess damage doesn't reduce the creature's normal form to 0 hit points, it isn't knocked unconscious.
From Wild Shape (PHB, pg. 67):
However, if you revert as a result of dropping to 0 hit points, any excess damage carries over to your normal form.
Does the PC with the Great Weapon Master feat get to attack again as a bonus action as per the first quote? They reduced the frog's hp to 0, but not the druid's.