This seems to be a problem with the session. You can eliminate this by editing the Kate configuration file in ~/.config/katerc
and replacing the corresponding lines with this:
Restore Window Configuration=false
and
Startup Session=none
Source:
[1] https://www.reddit.com/r/kde/comments/slxj9k/kate_doesnt_remember_the_last_project_folder_on/
[2] ChatGPT