This issue is noted in https://community.teamviewer.com/t5/General-Questions/Locking-remote-computer-at-the-end-of-session/m-p/31860/highlight/false#M16476
If you look at the bottom of this thread you notice that v14 has a bug in this setting for Macs. I wanted to give it its own thread (for Macs) as was supposedly fixed in V13.
Client & remote have latest Mojave version (10.14.5).
TeamViewer v14.3.4730
Every time I log onto remote computer the "Lock on Session End" is checked. There is no setting in preferences to set a default option on this. I uncheck and log off. Log on later and find this option checked once again (however, at least the remote machine did not log off, so the option is working) It is critical this remote machine not log off. Some machines I attach to do not have the "Lock on session end" checked. Some tests I run seem to indicate it might be related to the screen saver being active on the remote computer but haven't tested enough to really determine if this is the cause.