I am having the same problem with my 2024 GMC Sierra SLT Duramax and a Grand Design Imagine 2500rl. Both the GMC and RV dealer have been struggling with this to no avail. All of the trailer wiring and magnets have been tested and/or replaced. The GMC dealer actually soldered all of the trailer wiring connections to eliminate and loose connections. Again, nothing. They are bringing in a GM tech to assist.
Interesting note, I have noticed one consistency, it always occurs after I drive through an underpass and the solar panel gets shaded out. As soon as the sun his it again, the warnings go off.