I have a problem rotating a text on the Y axis. If I am in the middle of the screen it works fine but as soon as I move it around it changes shape. Grouping it does not help. I stumbled on this issue years ago but can't remember how I solved it.
You should be able to put it in a group, just make sure the group is of such a size to get the perspective you wanted. Then if you need to move the object, move the group instead.
But I don't want the object to go outside the group. And sorry I ment X axis. Check this file. When I rotate it the entire object morphs and goes outside the group instead of staying inside. example.zip (16.5 KB)
In the video you sent, you are rotating the group. But you should instead rotate the element inside the group as you did in the example.zip.
If you do not want the element to exceed the group's bounds, then you can set the Content Overflow property in the Metrics Inspector on the group to Hidden.
If you do not want the perspective warp, then you can use this CSS in the head html to turn off perspective changes, which would also keep it within the bounds:
<style>
div {
perspective: none !important;
}
</style>
If you want to maintain some perspective, but still have it always within the bounds of the group without exceeding it during rotation, you'd probably need to do some special care in scaling manually.