**API Platform version(s) affected**: 4.2 See https://github.com/api-platform/core/pull/7345 and related