Very quickly, certainly, the long-standing practice in the U.K. is that the Speaker, once elected, becomes independent. Usually, the other parties don't put up candidates in their riding. Other jurisdictions have other ways of doing it as well. In Ghana, for instance, the Speaker is either somebody from the outside or a member of the elected assembly who quits as an MP when they become Speaker.
There are different options that could be considered.