UI grid layout becomes weird in different resolutions

I was making inventory gui for a game but inventory grid does weird stuff when i change the resolution

here is a short video about the problem

could you send a picture of it please

does it not stay in the center?
(char)

yea, the grid layout sorts everything vertically like this


and makes everything smaller on higher resolutions

move the constraint under the whole frame if you want the whole frame to be scaled