Quite literally
everything is exposed to the OS. It can't really be any other way. If it weren't exposed to the OS, then you can't access it either.
Any protection mechanism you're imagining is managed by the OS. You trust it to enforce file permissions, to enforce memory isolation, to prevent a rogue program from snooping on data as it's unencrypted. You can't hide these things from the OS because the OS is the only thing that can hide data.
The OS has full, unrestricted control of the hardware at a level much deeper than you do. The OS can just read your encrypted data from 'secure' memory. It has to be, otherwise you couldn't read it. The OS can access any file because it has block level access to all drives.
And there's not one single thing you can do about it. There's absolutely nothing stopping your OS from spying on you in this way.
Unless you use an open source OS which can be proven to not do bad things.