UI distortion after Project update

UI of all my project got distorted when I updated my project from unity 2021.3.5f1 to unity 2021.3.27f1 . UI works fine on editor but when i make build for windows or android i get distorted completely in build. This issue was not there when i was working with earlier version of unity.
Weird thing is that if i make new scene and apply any image through canvas i gets distorted in new scene also. I have tried many things but didn’t work. Anybody can help please !!