It would seem reasonable to assume that the same rules apply to dogs as those that are applied to humans. For example, when people were rushing to get back from abroad in order to avoid having to self-isolate (or having to pay to stay in a quarantine hotel if they were coming from a high-risk country) due to Covid, it was the time that their flight landed, or their ship docked, in the UK that defined the cut-off point and not the time that they'd commenced their journey.
So it would seem to be highly likely that it's the time that the ferry docks which is the relevant one in your case.
For confirmation though, call the official Pet Travel helpline on 0370 241 1710 (0830 to 1700, Mon-Fri) or email the Animal & Plant Health Agency:
[email protected]