I use RealVNC to connect to an intel-based iMac, but it cannot wake it up if it is asleep after long inactivity. Yes, I don't change the setting to prevent from sleeping but only leave 'Wake for network access' on. However, the same works perfectly to connect a sleeping Mac Studio. This obviously has the merit of letting the machine rest and saving energy.
Both 'server' machines use WiFi and the other machine used to control them is not necessarily within the same local network. The 'server' machines do not have a public IP addresses. I tried to compare the settings like in 'Energy Saver' between the two host machines, but still have no clue.
BTW, whenWhen testing this, I noticed that I still can connect to the iMac right after (like 10 seconds) I manually put it to sleep, but not after. If I wait a few minutes.
Edit
The 'server' machine, it does not have a public IP addresswork.