It’s very strange that this should happen in the first place.
If the +12V supply is isolated from the USB supply and it can as there is no need to have a common ground in this type of application, then there is no reason for the drop in the supply at the USB DP module.
This sounds very similar to the issue on another thread in relation to the 16 channel board. There the use has a similar issue when switching and external load.
The only real time this would happen is cross coupling via the PCB but I assume that the layout is such that the high voltage contacts are kept clear of the switching side.
I would have suspected the switching current of the relay pulling down the 5V rail but you said it does not do this when switching with a lamp connected. Relays do not take extra current based on the switched voltage or current.
Just out of curiosity, would it be possible to post a schematic of the complete circuit showing each power supply. I know Gus is going to test with the solenoid but I have worked with system using relays to power high current hydraulic valves with none of the issues I am seeing here.