Toddler acting out

It feels like my 2.5 year old has completely changed in the past 1-2 weeks. He’s become so much more defiant and disobedient and just acts in general like he hates me. It’s making me so sad, especially as I know our time of just me and him is coming to an end. It feels like my sweet caring boy is gone. He’s also started to regress a bit with toilet training. Could he be acting this way as he senses a big change is coming? Or maybe it’s because I’m so tired and not as patient as normal. Anyone else going through this? Or had this with previous pregnancies and older children? I’m worried he’s only going to get worse when the baby comes and it’s pretty bad at the moment ! I can’t stop crying about it and it’s making me feel so guilty for having another!