Bug report
Due to LSP, the class of an object may be a subclass of the documented type, which appears not to be respected during instanceof.
Code snippet that reproduces the problem
https://phpstan.org/r/fa44c3a7-3f89-4bc8-a23c-94f01e9b9227
Expected output
No error should be reported.