How to freeze a range like atomicRanges but cannot be deleted using the Backspace

Hello,

I made a Replacing Decoration in CodeMirror 6, and I set atomicRanges for it.
Now, I want to freeze the range so that it cannot be deleted using the Backspace key or similar shortcuts. It should only be deleted by clicking the button that I set in the Decoration itself.

One way I thought of doing this is to change the default delete command, but I want to know if there is a better way to do it.

changeFilter is the feature that is designed for this kind of thing.

Totally ignored that Facet before, it’s powerful.

Now it works, thanks a lot!