It's not totally mutually exclusive. But canvas operations aren't hardware accelerated, and rendering of HTML potentially is.
It's still possible to make the DOM complicated enough that moving to canvas has performance advantages. I don't know the details, but I'm guessing that is achieved by skipping updates the browser would usually make.
Webgl is tho. But even in 2d context api, you have bigger control over how your content is being printed than in html. Which means that a lot of operations that DOM performs unnecessarily in the context of Google docs can be simply discarded.
It's still possible to make the DOM complicated enough that moving to canvas has performance advantages. I don't know the details, but I'm guessing that is achieved by skipping updates the browser would usually make.