I also encountered like same issue.
Please see the followings.
https://forum.seeedstudio.com/t/join-error-when-using-sensecap-m2-gateway-with-otaa-on-aws-iot-core-for-lorawan/283394
In addition, I checked to operate successfly with ABP.
However, it not operated successfly with OTAA.
What`s your activation settings?