Hello, my name is Pavel, and I will be supporting your case, I reviewed your information I do not get clear what kind of example are you using, but I review the sdcard_freertos_cm7 and review the doc file and this mentioned the following.
Note: If DATA3 is used as the card detect PIN, please make sure DATA3 is pull down, no matter internal or external, at the same time, make sure the card can pull DATA3 up, then host can detect card through DATA3.And SDHC do not support detect card through CD by host, card can be detected through DATA3 or GPIO.No matter detect card through host or gpio, make sure the pinmux configuration is correct.
Please make sure R136 is weld for GPIO card detect.
Let me know if you have more doubts.
Best regards,
Pavel