Regarding the issue at hand, are the group claims being sent from your Okta application in the token?
You can review this documentation from Okta about sending the groups in the token:
Basically, you would need to go to the Okta application → Sign on tab → OIDC ID Token → Edit → Group Claims Filter → Use the name groups → Select Matches Regex → Type .*
This will return the groups in a string not in an array.
Let me know if this works.
Kind Regards,
Nik