The border is distorted because the scaling is distorting the entire Generator image, it does not apply to the Generator's shape objects. To me, the original Shapes generator was one of the worst designed templates ever included in Final Cut... but I digress...
I made this free "Basic Rectangle":
https://fcpxtemplates.com/sdm_downloads/basic-rectangle/
Unlike the original, this is an Effect — not a Generator (if you need help installing it: Installing Plugins for FCPX ). It also does not support drop shadows (if you need drop shadow... let me know). [It can be added directly to Titles and Generators just like any other kind of media.]
Another "feature", the Rectangle size is determined by the size of the media it is added to (or the project size when used with Titles or Generators). If you copy and paste a "setup" from, say, an HD clip to a Vertical clip, the rectangle automatically resizes to the media. You can **save** your own custom Effects Presets with this template.
Like the original, there is a center OnScreen Control. It can be hidden if it gets in your way.
There is a Fill Color with Opacity AND Blend Mode for the fill. Experiment (check out Stencil Alpha). Use Behind when adding to a Basic Title (or others with no "Background" layer).
Roundness goes from no roundness to a semi-circle and how it is applied will depend on whether the rectangle is wide or tall.
Corners is there basically only because it was included in the original. They're only "obvious" when the outline width is large.
The way the Width and Height controls work is by Percent of Size of the media (or project if applied to a Generator or a Title.) If you need to know the actual size, you can Show Dimensions. For a 1920x1080 clip, a setting of 100(%) will display 1920x1080. If you want to use this for vertical or other media sizes (2K, 4K, etc.) you can set the Proj. V Res value to the media height or the project height and the Dimension values will display the actual pixel sizes of the media/project. For example, for 1080x1920, set the Proj. V Res to 1920 to show the pixel size of the Rectangle (or you can just leave it at 1080 if you can deal with *relative* size values). [If you set the Proj. V Res to 100, the dimensions will be shown as percents (but with no decimal portions...).]

I set up the *default* Width and Height to 1720 x 880 (or inset from the edges of a 1920x1080 clip by 100px all around) — that's the reason for 89.6 (%) and 81.5 (%). [There's no such thing as a fractional pixel, so the actual percent values translate to 1720.32 and 880.2... but there's no visual difference.]
Hope this helps you out. Let me know if you have any issues.