I mean they could technically? "For operational reasons, VIA Rail reserves the right to restrict platform access five (5) minutes before your
scheduled departure." As per "
https://www.viarail.ca/en/conditions-contract" and you would have no recourse as you agreed to these rules when you bought the ticket.
I mean it's very very unlikely that they would.... but stranger things have happened.
Not the same situation but there was a Reddit post recently where someone got refused boarding as they arrived 5.minues before the departure time on their ticket at Ottawa station.