By any chance, have you tried to validate your ID token using JWT.io as mentioned in this community post in order to inspect if the custom claims are added to it?
Please attempt to do so and let me know if the test claim is visible in there or not.
For the information that you have provided so far, you seem to be setting the action accordingly and when you try to retrieve the custom claims in your React App they should be definitely visible in your console log.
I will be looking further into the matter and will try to come back with an update as soon as possible.
Kind Regards,
Nik