This article lists the very restrictive hardware and macOS requirements for the now-deprecated Target Display Mode (TDM):
Use your iMac as a display with target display mode - Apple Support
A 2011 iMac can be used as an external monitor only for certain older Macs and OS versions. That is where you may have encountered your issues. From the linked article:

You did not give the specs of your other Macs, but newer models and OS versions cannot be the source device for your 2011 iMac.
The thread I located about this had to do with using this iMac as a Windows monitor. Apparently, since Win machines have USB-C and not true Thunderbolt, the answer was "no."
The reason it does not work with Windows is Windows, not ports. Apple never intended, documented nor supported TDM for Windows, It was always a and Mac-To-Mac function.
And it is dead tech. Apple started TDM's deprecation in Late 2014 and threw the last shovel of dirt in its face in early 2020. A traditional external monitor is a far better solution.