Outlined rectangles are one pixel larger with vector-based drawing, adjust them to get consistent behavior. Ellipses do not appear to need adjustment. See #17091 (cherry picked from commit 4623c5ad9c)
4623c5ad9c