Per the reference guide to Mendix 4, you can control session behavior with the use of 2 custom settings. KeepAlive and SessionTimeout. See https://world.mendix.com/display/refguide4/Custom+Settings for an explnation of both.
I believe there is a server setting that can be used for this - see documentation here: Custom Settings Documentation
And look at the SessionTimeout setting. I have not used this, so don't have any first hand experience.
There is no setting for this see the following post