I upgraded to 5.4 and noticed some of my UI buttons were suddenly huge and off the screen. After digging around for a while, it seems that as of 5.4 at least, if the canvas Z scale is 0, or the parent Z scale is 0, the buttons get huge and positioned wrong. Any value other than 0 seems ok.
I'm not sure why I had them as Z scale 0, but that's what was breaking now. I changed to 1 and it's fine. Here's a video showing the issue:
I'm not sure why I had them as Z scale 0, but that's what was breaking now. I changed to 1 and it's fine. Here's a video showing the issue: