"Parent missing" error when I use my plugin in a group

When I use my plugin element alone, everything is fine. But if I use my plugin element in a group, I get the “Parent is missing” error.

Here are my codes:

The error I got:

By the way, the red border you see, the border of my plugin element.