The new leader will replace Trudeau as PM; he said he’d step down as PM once the leader is elected. It’s just that the same day this happens, parliament will come back in session and almost certainly bring this new government down in a vote of non-confidence. The new leader will stay PM over the course of the campaign period.
Edit: The new government being voted down isn’t as much of a certainty. The NDP have walked back their promise to do so; not sure about the Bloc. Either one could prop up the Liberals.
I don’t see what they would gain by doing that. The slim chance of staying in government until the fall is super valuable to the Liberals, giving the ability to get the new leader’s name out there and to prove that they can handle Trump.
Edit: Yesterday the NDP said that they’re no longer committing to bring down the government so I feel like the Liberals have more of a reason not to drop the writ. That being said, Carney said he’d be willing to call an election once he’s sworn in. So we’ll see