Show how you actually add the button and set its position.
I just ran a test using constraints against the safeAreaLayoutGuide.topAnchor and the view is positioned as expected below the status bar. This is for an iPhone SE 3rd gen iOS 26 simulator.
If you are relying on manually setting a view's frame based on safeAreaInsets then you must keep in mind that the insets can change. Override viewSafeAreaInsetsDidChange in your view controller and update frames as needed. But using constraints is so much simpler.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: