From what we've seen, in universe, Starfleet officers don't change division colors for temporary assignments.
Worf for example:
spent most of his first year on the Enterprise-D as a relief officer for the conn and other bridge stations.
WhenTasha Yar was killed, Worf permanently took over as tactical officer/chief of security and his uniform changed to operations gold. This remained the case until 2372 when he was permanently reassigned to DS9 as strategic operations officer. Despite returning to his tactical role aboard the Enterprise E in all of the TNG era movies, his uniform never changed as those assignments were temporary.
Geordi La Forge had a similar experience.
In 2365, La Forge was promoted to full lieutenant. He transferred from the command division to the operations division and was named chief engineer.
At this point he started wearing operations gold instead of command red.
During the events of Gambit, Data and Worf temporarily commanded the Enterprise in the absence of Picard and Riker. Neither changed their uniform color to command red as it was temporary.
However, a year earlier, Riker was relieved of duty and Data was promoted, apparently permanently, to first officer. At that point, he wore command red because the reassignment was meant to be permanent.
Dax was primarily a science officer. Generally, command of the Defiant fell to Worf when Sisko wasn't around but Worf was off serving in the Klingon fleet. Dax was the next highest ranking and most experienced officer available so she was temporarily given command of the Defiant while Sisko was assigned to the Starbase. There was no uniform change because it wasn't a permanent reassignment.