Since you are using Jetpack 5.1.3, I would suggest you using r35.5.0-updates branch to prevent unexpected error.
Please note that the fix is included in tos image rather than uefi binary.
The key point is to apply the fix and build uefi_StandaloneMmOptee_RELEASE.bin, which is required before you built op-tee.