For pattern matching to see an in-sync view of the object, the object must provide such a view. If the object allows concurrent modification (most don't) then it must provide a custom view. Otherwise a generated default view should be sufficient.
If you look at [1] you can see that Goetz does propose a function that provides such a view for classes and not just records (c-f extractor.)
[1] https://cr.openjdk.java.net/~briangoetz/amber/pattern-semant...