13.x
[12.x] Fix calling `toArray()` on `AnonymousResourceCollection` returns an array of resources (#58302)