The way to solve a ground loop is to purchase properly or fix improperly designed equipment. Adding a transformer is a bandaid. Bandaids fall off.
My company wired recording and film studios in Los Angeles and New York in the 1980s & 1990s. We had transformer and electronic balanced and unbalanced equipment to interface. Hundreds of connections that could be reconfigured into literally millions of combinations. Correctly done, there is no ground loop.
If you detail out your equipment and connections, perhaps we can solve your issue. By detail, I mean brand, connection, electrical power etc. Since we can now post images, draw a sketch.