TL;DR You pay taxes where you are resident.
If you are 183 days or more (or whatever the current requirement is ¹) present in Canada then you are a Canadian resident and must pay Canadian taxes.
IANAL but I have been in this situation.
1. https://www.canada.ca/en/revenue-agency/services/tax/interna...