> It's a vulnerability of all modern desktop operating systems

Uhm, OpenBSD would like a word, buddy.

https://man.openbsd.org/unveil

That has the caveat that it only works as far as apps opt into it

Chromium and Firefox have unveil on OpenBSD, which is a good start.