Materials being applied to multiple unrelated items

When I apply a material to mechanical HVAC ductwork, the material is also applied to hydraulic sanitary drainage pipework.

Originally the sanitary drainage pipework was in a model that was linked into the HVAC model and then I used Direct Link to import the HVAC model into Twinmotion. These two types of elements have different worksets and materials in Revit.

When the above happened, I tried to resolve this problem a couple of ways, both of which did not work.

First I unlinked the pipework model from the HVAC model in Revit and then used Direct Link to import both HVAC and pipework separately. Same problem with applying materials occurred.

Then I tried exporting both mechanical and hydraulic models as separate Datasmith files and importing them into Twinmotion. It also did not work.

What could be the reason these two separate items somehow get the same material applied to them? How can I resolve the problem. I am using Twinmotion 2023 and the Revit version is 2024.