Hi and welcome!
This has come up before in the old forums and is something that I continue to think about, but don’t have any end all solution in the works.
FoldingText 1.x and TaskPaper did work much as you describe. And its useful in some cases, but I also feel that it complicates the app. In FoldingText 2 I changed things to make the mental model of what FoldingText is simpler:
Your document is a text file, and commands work like in a normal text editor.
Regions of your document can be folded, the text is visually hidden behind a fold graphic. But it’s still visible, you can see the fold. And it still acts like text. You can select, delete, copy, and undo.
Adding the proposed constraints breaks some fundamental behaviors. For example I’ve lost data in a number of cases (In FoldingText 1.x and TaskPaper) when I did a “Select All” and copy in a document that I didn’t realized was filtered. Also users have gotten confused in the past when they focus in and think they’ve lost the rest of their document, since it’s not visible or selectable.
I do think there’s something to be said for making it more noticeable when you delete a fold, since that fold is visually small and might represent a lot of text. Just not sure one best way to do that.