There are times where the RDM, or Roof Door Module, tends to get stuck in a cycle and will not move, or partially move, or windows will not go up or down, etc…. This could be caused by the RDM or associated circuits to get some stray signals and need a reset. Some people claimed that swapping relays or fuses will reset the system. Although it may seem like it works that way, what you are actually doing is removing powered paths in the circuit and they tend to settle down and start working again.
The best advice is to remove power from the ECM at fuse 27 or pull power off the entire system with the battery cable at the fuse box, jump box in engine bay, or battery under truck for 30 minutes. While the cables are off take a look at all the ground areas on the vehicle, make sure all the other connections are good, then reconnect power hopefully things are back the way they are supposed to be.
Troubleshooting the roof system can be complicated with all the moving parts and it certainly cannot be diagnosed without seeing it in person, but removing power and resetting the system is a good first step. If a replacement RDM is needed. note that the 03-04 and 05-06 are somewhat compatible. If you use a 03-04 on a 05-06 you will loose the outside temperature readout.
I may have an RDM for sale as I come across them now and then, please visit my Parts page for availability.