Discussed in slack thread:
The issue is that the MonoPInvokeCallback attribute is on a generic method and with "Optimize for code size and build time" set IL2CPP isn't scanning for generic instances so it doesn't generate the code needed to support OpenXRCustomLayerHandler<XrCompositionLayerQuad>::OnCreatedSwapchainCallback .
This is a known/expected issue but we've never gotten a user bug report about it. It was reported internally and was fixed in 6.5. If the customer would want this back ported (I don't see a version in the ticket) please report this as a bug against IL2CPP.