Hello Jonas.
There is a possibility to use the lock function (Design>Lock). This will at least hide the Design folder in both modes. Unfortunately the Document folder is still visible.
The lock function can't be undone, so please create a backup!!
There is no way today to lock this with any script functions.
I think this will be a good feature, so I will add this to the PLUS+1 Wishlist.