I apologize for the late answer.
Are using the script imx_build.sh for building the imx-optee-os project?
/external-link.jspa?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Fimx-optee-os%2Ftree%2...
imx_build.sh\scripts - imx-optee-os - i.MX optee os
On i.MX8MQ the header is not included tee.bin when built with this script, the only difference between the tee-pager.bin and tee.bin is a padding at the end of the binary.

Currently, we are not using the OP-TEE header as you pointed in the link below.
OP-TEE header · linaro-swg/arm-trusted-firmware@f6244e8 · GitHub
The recommended way to build a flash.bin image containing OP-TEE is explained in post below:
https://community.nxp.com/docs/DOC-340663
Just summarizing the process:
- U-Boot:
$ make imx8mq_evk_defconfig
$ make -j4
Copy u-boot.bin, u-boot-nodtb.bin, u-boot-spl.bin and fsl-imx8mq-evk.dtb to imx_mkimage/iMX8M/
- ATF:
$ make PLAT=imx8mq SPD=opteed bl31
Copy bl31.bin to imx_mkimage/iMX8M/
- OP-TEE:
$ ./scripts/imx_build.sh mx8mqevk
Copy tee.bin to imx_mkimage/iMX8M/
- Firmwares:
$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.6.bin
$ ./firmware-imx-7.6.bin
Copy lpddr4_pmu_train_*.bin and signed_hdmi_imx8m.bin to imx_mkimage/iMX8M/
- mkimage:
$ make SOC=iMX8M flash_evk
Please let me know if this help.
Best Regards,
Diego.