Double border in UIBarButtonItem with Custom View on iOS 26, bug or feature?

I have several UIBarButtonItems in a navigation bar, and they get the default glass treatment in iOS26. All look ok excepting one, which is a UIBarButtonItem with a custom view, a plain UIButton. This one does not change the tint of the inner button's image to white/black like all the others, but it stays blue, like the regular tinted bar buttons pre iOS26.

I then built the inner UIButton starting from glass configuration, UIButton.Configuration.glass(), and it looks fine, see the 2nd pic. But if I send the app to background and bring it back, the inner button gets a border, such that the bar button now has 2 borders, and look out of place compared to the other bar buttons, see 3rd pic.

Is this a bug or a feature? How can I make custom-view bar buttons look like regular ones, without double border.

Could you please share a link to a test project that reproduces the issue or code snippet on how the UIBarButtonItem are created. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

How can I send you the test project? I cannot attach the zip here.

In viewDidLoad I set the button, and it looks ok. Then, when the user initiates some action, I replace it with another button, and now it gets a double border.

override func viewDidLoad() {
	super.viewDidLoad()
	self.navigationItem.leftBarButtonItem = Button1()
}

@objc func fullscreenAction() {
	// upon this assignment the leftBarButtonItem shows double border
	self.navigationItem.leftBarButtonItem = Button2()
}
Double border in UIBarButtonItem with Custom View on iOS 26, bug or feature?
 
 
Q