Maintain hierarchical structure of sprite groups instead of flattening.
Allows opacity and blend mode to be applied correctly to groups.
Sets the foundation for future features like mask layers.
Note:
Requires full image rendering and impacts performance in some scenarios.
Avoids complex code changes for minor performance gains.
Co-authored-by: Guilherme Marcondes <guilherme.marcondes@tecnico.ulisboa.pt>