I investigated but didn't find the issue, your code seems correct to me.
After discussing with colleagues, they only said that it is not recommended to dynamically create widgets, because TouchGFX is allocating statically memory.
So, we strongly recommend people to create their widgets manually in TouchGFXDesigner, set them at non-visible and then show them at runtime.
We know that some customers like you have a lot of widgets they want to create dynamically, so we encourage instead at factorizing and reducing the number of widget, and then dynamically change the data displayed inside.