Your UI is a collection of input/output widgets. The vast majority of apps have maybe one or two app-specific widgets and the rest are completely standard. Why the hell do so many developers insist on styling every stupid textbox just they way they like it?? No, fuck you, a textbox is a textbox, your textbox isn't special, if I want texboxes on my screen to be in purple comic sans on a green background, that's exactly what they should look like.
The reason why apps break when custom themes are applied is almost always because a developer made a "white box with a grey border and black text" instead of a "--bg-surface-color box with a --border-color border and --fg-primary-color text".
It's the same with icons - if you want a homepage button, reference the "home" icon. If you want a house/flat/skyscraper/boathouse dropdown, reference the "house" icon. If you use "home" to show a house because that's what it is on your theme, don't be surprised (let alone angry) that I've set home to a picture of a cat and now your dropdown makes no sense.
Yes, sometimes the platform doesn't give you enough tools to adhere to the system theme (although most apps aren't complex enough to run into that), but there are usually workarounds or you can open a bug report. Most "modern" developers, however, just don't. They draw their UI in Figma and set out to make it in code, pixel-for-pixel if possible.