Would it be possible for it to not happen right away? They are in a minority government without a PM, I really wonder if there's a way the elections aren't triggered basically instantly.
With Trudeau leaving, I suspect that at least one of the other parties will give them enough time to elect a new leader before bringing down the government. The government may even last until the required election date of late October however, nothing of any importance will likely be passed in that time
Unfortunately, the liberal party rules say they require a minimum of four months to elect a new leader. They may be able to fast track it in three months, but it’s entirely up to the liberal party so I suspect Trudeau will still be leader when Parliament resumes.