A struct constraint wouldn't help in this scenario as a struct can just wrap a mutable class and you will have the same problem again. The obvious next idea of making it a recursive requirement of all store properties is too strict because it is possible to implement a struct that wraps a class in a way that @Observable can observe changes. All container types like String, Array, Set, Dictionary etc. do exactly that.
What you probably want is something that is often referred to as a "value semantics" constraint or "value types" although I don't think we ever landed on a formal definition of the term. Generally the idea of such a constraint would be that all mutations need to go through a mutating access (which is what @Observable picks up through the set/_modify accessor) and otherwise the value can't change.
Edit: For @Observable this would actually be too restrictive as well as other classes that also use @Observable are actually fine and work with the observation system.