Problem with fixed Resolution and UI anchoring

I have a problem when it comes to ui anchoring and fixed resolution.
In my example I have 2 buttons one anchored at the top of the screen and and one at the bottom.
The Canvas has Canvas scaler (Scale with UI size) match height 1. Reference resolution 1024x640

So in the first image where I use aspect ratio 16:10 everything works as it should, i.e. the buttons are anchored at the top and bottom of the screen.
But something strange happens when I change the resolution to 1024x640 as we see in the second image

First thing we see is that for some reason the scale of the game view becomes 0.93.
But when I set it to 1 which is what I see when I build the game. The buttons are cut off the screen. Why is that happening?

UPDATE**
It seems that this problem does not appear on every device. My laptop has screen resolution 1366x768 and the UI at the WEBGL still has the problem. I tried it on a computer with 1920x1080 resolution and the UI was fine.

It sounds like in the 1024x640 version it doesn’t fully fit into your game view, so it gets scaled down, and if you scale it up to 1, then parts of it will be off the game view window.

Could you try pressing “maximize on play” to confirm that it does look ok at a scale of 1? If my suspicion is correct, then it’s working as expected and it will look fine on your device.

follow this link will solve your problem
https://docs.unity3d.com/Manual/HOWTO-UIMultiResolution.html