When you say ARD, are you still using the old ARD from the App Store? I don't use that but I use 'Screen Sharing' to remote into a Mac Mini. I don't have any issue doing this. All you need to do is go into Security & Privacy and uncheck "Require Password immediately after sleep or screen saver begins", when you uncheck this, you should get a prompt to "disable screen lock", make sure to disable. Set screen saver after never. Change the Energy Saver to never turn display off. Check "Prevent Computer from sleeping automatically...". Doing this will make Mac Mini vulnerable to someone connecting mouse/keyboard and monitor directly to manipulate the device since the Mac Mini is always unlocked.
If it still happens after making those changes, it may be a "feature" with ARD? to Lock when closing.