This is the page the OP is referring to:
https://travel.gc.ca/travel-covid/tr...ictions/border
So according to this:
Overnight connections are not possible at:
- Montréal-Trudeau (YUL)
- Calgary International (YYC)
- Vancouver International (YVR)
- Toronto Pearson (YYZ)
It would be helpful if the OP could list the airlines and flight numbers as I mostly have experience with *A within Terminal 1.
Historically you could never transit in Canada. You always had to go through immigration. With COVID they seem to have made a special exception (maybe to keep airlines afloat).
According to the rules the OPs flights are not allowed. Theoretically you can remain in the international secured area overnight as long as you are not ferried into immigration. And at that point it's up to the border official.
Personally, I'd have a rapid antigen test taken within 1 day of entry into Canada just in case. I would not risk it without this.