Comments
- iOS 14 is still beta and any view hierarchy based solution can stop working with the next beta release.
- It can also stop working in any future iOS release (not beta).
- You're relying on a private view hierarchy. Apple can change it anytime without any further notice. IOW it belongs to the private API usage category = you're on your own here.
UIPageControl view hierarchy
iOS 13

iOS 14

New API
Even if you update your code to match the new view hierarchy ...
UIView *pageControlContentView = self.pageControl.subviews[0];
UIView *pageControlIndicatorContentView = pageControlContentView.subviews[0];
[pageControlIndicatorContentView.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
obj.layer.borderWidth = 1;
obj.layer.borderColor = UIColor.blueColor.CGColor;
}];
... you'll get something like this:

iOS 14 introduced new properties and methods you can use:
You can use SF Symbols for example:
UIImage *image = [UIImage systemImageNamed:@"link.circle.fill"];
self.pageControl.preferredIndicatorImage = image;
Then you'll get:

In other words, to be safe, avoid private view hierarchies, use preferredIndicatorImage
. You can prepare your own images if you'd like to customize them, etc. But it's a topic for another question. If you'd like to do it programmatically, search for questions like this one.
Since you're using private view hierarchy, learn your tools (Xcode) and start with the Examining the View Hierarchy and Debugging View Hierarchies chapters. You'll be able to find yourself what's the problem next time.