When the string breaks, it's a bit harder to control tuning, but before hand, you can take some preventative measures.
1. Try the shavings from a pencil. The graphite of the point ( not lead) is great for rubbing into the nut slots and keeping to hold the string in tune.
2. Stretching the strings, from the bridge to the nut will help settle the string in the nut/cradle a bit better. Do all the strings 1by1.
3. When the string finally does break, and you are on stage, then try bending the neck forward, ever so slightly.
Now I'll probably get a lot of flack for that, as guys like Jay, Dave, and JLynn are more "luthierly" inclined, but I learned this from a
Bill Frisell masterclass. He's known for using
teles, and when a string breaks, or they go out of tune, he pushes the neck-almost like Adrian Belew, and it works-for him

!