Doctrine uses proxy objects to represent related objects in order to facilitate lazy loading. This is a really cool feature, but its causing an issue with something I am trying
The Symfony PropertyNormalizer gets around this issue using the ReflectionClass getParent method. If you need to inspect the object, as for a normalizer, rather than just use the ->get methods, you should be able to use a similar approach.
It appears the Proxy has a parent of the actual entity, which is why instanceof still works.