I described the issue in Discord:
Fireship Discord Thread
Main thing: in the code for creating the cookie that is used for server auth in the SvelteKit course, the field expiresIn (maxAge) is already in seconds, not miliseconds. Therefore, it shouldn't be multiplied by 1000 (unless I am missing something).
Current course course
api/signin/+server.ts
...
const expiresIn = 60 * 60 * 24 * 5 * 1000; // 5 days
...
As if expiresIn (maxAge later) were in miliseconds.
Just changing it to this fixes the problem:
...
const expiresIn = 60 * 60 * 24 * 5; // * 1000; // 5 days
...