Unity ui toolkit is stretched on portrait mode

unity ui toolkit is stretched on portrait mode and when I build it on android their is no problem and this only exist on the editor. when I started the project their is no problem and after a reboot, directly gone to the play this happened. changes on the panel settings doesn’t helped.
unity version - 2022.3.48f1

Have you selected correct dimensions for the game view?
Aspect

edit: Temporary fix https://youtu.be/qMnj7i-1wZk

yeah I did, in the landscape mode the element is readable but the gap between elements horizontally stretched. After I restarted unity everything seems fine but after sometimes, it happened again. Then I saved the project and restarted unity again it seems fixed but I don’t know how long. But their is no problem with the android build.

The way to get the current screen size is different in the editor compared to the player. A known issue is when two game view are set to the same display, only one of them will drive UI Toolkit size and it will be the last one interacted with if I am not mistaken. The device simulator is built upon a game view on display 0, so if you have another game view open it may pose a problem. It look like this is what is happening in your video.

Try having only one or the other tab opened and it should not reproduce the problem.

If that doesn’t help and that you have any steps that could be use to reproduce this, please report a bug.