I'd recommend going back a few days before the end of the summer term (eg weds-fri) to give you a few days to get set up for next academic year. Technically you could go back the first day of the summer holidays for full pay though.
I went back first day of the holidays with DS (born start of October). I went back for the last 3 days of July with DD (born start of November). It was miserable being in for that short time, I had to teach classes I didn’t know (despite my maternity cover being in school still) and had no time for prep in school for the following year. I wish I hadn’t bothered.
I went pt after DS was born but made sure my pt contract started 1st September so was paid ft for August.