I worked at a US university for 12 years, I can’t speak to what happens in Canada, but here in the US it’s definitely a mix. Student tuition is not used for research at all, at least not in any research program I’ve ever heard of.
In fact, research grants are garnished (usually to the tune of 30% or more) to pay general university expenses, and student instruction is part of that budget.