The immediate technical problem is that OSes allow apps to declare what is "sensitive", and then follow those declarations unquestionably, preventing any preservation of that information.
The underlying social / political problem is that platform vendors allow app vendors to unilaterally declare what is and isn't sensitive, and proxy their opinion without question, and with no consideration for users and their context.
This is a failure of imagination for Apple, but it’s hard to blame them.
Who would think someone would put a button inside a “secure” text field and change the masked appearance to a logo?
If I was proposing this feature, I would never imagine someone would come up with something like that.