php why the session destroyed before the expiration time?

For security reasons I deleted all cookies from my code and replaced them with sessions.
Why doesn’t the system maintain the user session and login?
the user is logged out prematurely
I modified the php.ini with the value
session.gc_maxlifetime = 86400 //1 day
and added to my php code the same value
ini_set(‘session.gc_maxlifetime’,86400);

I’m confused.
I think the problem is closing the browser or PC before the expiration time. confirmed?
How could I avoid it?

this is my code
login.php (after ajax)

session_start();
include("../config.php");

$_SESSION['iax']=$id_az;
$_SESSION['nome_utx']=$nome;

and on all pages
config.php

ob_start();
if (!isset($_SESSION)) {
//Imposta la durata del cookie della sessione
ini_set('session.cookie_lifetime', 86400);//echo ini_get('session.cookie_lifetime')
//Imposta la durata massima della sessione
ini_set('session.gc_maxlifetime', 86400);
//echo "time: ".ini_get("session.gc_maxlifetime");
# Enable session garbage collection with a 1% chance of
# running on each session_start()
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 100);
session_start();
}

.....
CODE
....