Maximum number of sessions reached error message when launching resource published from Virtual Guest:
Change Max connections value in VDI host properties > Agent Settings:
NOTE that this is a global host setting. It is not related to the guests created from RAS templates. Therefore, all powered on VMs on the host will be considered when evaluating if there is enough capacity to power on a VM.