My vote with would be to keep the Beretta. Wars are not won or lost by the issue sidearm and the Beretta works reasonably well. If I were forced to change I’d not go with a Glock. The ergos are flat out awful for a lot of people.
If staying with 9mm and striker fired I’d choose either the HK VP9 or Sig P320.
If the requirement was to go back to 45 I’d choose the S&W M&P45.
I would not choose any flavor of Glock or 1911.
I lived through the transition from .45 to 9mm.
My issued .45 rattled when I walked around and it was kind of a guess where the bullet was going to land when you pulled the trigger but it fired every time.
I was issued 2 different M9s during my time in service, both of them were new and shot tight groups but both broke when shooting quals. Not a confidence booster. I’m assuming they eventually worked out the manufacturing issues but it left me not comfortable with that weapon system.