Not sure if this will work the way you want.
I created a dummy drawing with a dummy block and a dummy attribute. When you set the attribute to Invisible, you can't see it any more, but you can edit it. I know, that's not what you want. I include it so you don't waste time trying it for yourself.
When you set the attribute to Constant, you can't edit it at all. It no longer shows up in the Properties, and it doesn't show up in the block. If you change the attribute back to not constant, you can insert a new block and give it a different value, but it's still invisible and it does show up in Properties. Could be a bug? Or the way I handled it.