The current app for Display link doesn't support ClamShell mode for the macs. I have found out that the older version 5.25 works, but requires a kernel extension to work. I have had that whitelisted forever with a configuration profile and have had no issues. I am trying to get it working on new machines, more importantly, big sur and no matter what I do it prompts me to allow the extension through.
Has anyone attempted to get this working? Have you had any luck?
You can still force some KEXTs with JAMF, but it does not work well and I am sure Apple will totally remove KEXTs here soon. I just find myself using an application to prevent sleep mode like Amphetamine. Just launch Amphetamine and untick the box to allow the display to sleep when the lid is closed. I am not sure if you can programmatically do this for an option without user interaction.
When you close the lid on the Mac it does not go to sleep, but the display stays active so sometimes windows get lost over there. Not perfect but it works enough for me.
There is also caffeinate which is all CLI based. I am sure you could sort out a script to trigger caffeinate.