Not able to reproduce with Xcode 13 beta 2 or main. Is that the only code, or is there more to it? Are you seeing a compiler error (if so, what is the error)? Is the problem that the availability annotations are not being honored correctly?
This is intentional. The ABI of enum cases with payloads that are potentially unavailable is not well-defined. That this worked in the past was by coincidence of your application not requiring the (potentially unavailable) type metadata for the payload. Please either increase your deployment target or mark Foo itself as available as the least-available case.