When I save sessions, I have a choice of saving new sessions or overwriting existing sessions. I think that TRS2022 just save new sessions even if I want to overwite existing sessions. Is this a bug?
It depends on what was altered in the session. If a driver command only was changed then it will save the session. If you added something like a train in a session layer it will ask to save route and session or overwrite the route or session. If you have UDS version and save it after you went into driver mode, it will only save a new session because it is linked to the position driver is at the time of the save.
It is normal. As stahecoach has pointed out above if you change anything in the Session (such as a consist load, an industry setting, a Session Rule or Driver Command, a new driver, set the time of day, weather, lighting, etc) then you will be given the option of overwriting the current Session (i.e. replace it with the new Session) or creating a new Session with a new name.
You will also be offered the same choice if you change certain things that are in the Route - such as throw a switch lever (the current direction is a Session property while the default direction is a Route property - this allows you to have the switch set for different directions in different Sessions) or rename a nameable sign such as a station sign (the name is stored in both the Route and the Session - why I do not know). I generally ignore the offer to save the Session for these changes.