When editing a UI prefab in the scene, if you have a CanvasScaler or are using a ScreenSpace canvas with a Render Camera set, the shape's scale seems to be wrong in the prefab editing view. Using edit in isolation seems to do a bit better, and then you can provide a scene for Unity to use, but it's not a perfect solution. I believe Unity is using a world space canvas for prefab editing instead of using the canvas from the scene.
When editing a UI prefab in the scene, if you have a CanvasScaler or are using a ScreenSpace canvas with a Render Camera set, the shape's scale seems to be wrong in the prefab editing view. Using edit in isolation seems to do a bit better, and then you can provide a scene for Unity to use, but it's not a perfect solution. I believe Unity is using a world space canvas for prefab editing instead of using the canvas from the scene.