I'll post what has worked for me, just for the case someone were using the same versions and facing similar issue.
I switched the projects to .NET 8, and upgraded OpenIddict via versions 4.x and 5.x to version 6.0.0, using OpenIddict's author's instructions:
All the steps were smooth and easy. Once done, the custom claims are back, all seem to be working fine.