Yes, time spent with leave extended by law under Section 3C of the Immigration Act 1971 may count as time in the UK with permission on the relevant route to calculate continuous residence.