When it comes down to finally facing Liberty I strongly advise having Nerd Stuff 10 available so that you can disable her drones for the initial part of the fight - they’ll turn on her until phase one is complete so you can focus on killing off the other human support and hacking/killing the smaller turrets.
When she is down to about 25% health, she’ll yield and ask you to take her in. Obviously, you refuse this and trigger the second phase of the fight. Note that this is an entirely new engagement, so if you’re quick you can get an attack off first and avoid an “ambushed” status.
You should realistically be more than strong enough by the end of the game to win the fight either way, but be prepared and it’ll be a cakewalk.