Say it clearly. Keep it simple.
In Perfekt with a modal and another infinitive, the modal normally stays an infinitive rather than becoming a participle. In subordinate clauses, haben precedes the infinitive cluster.
Spot the clue
A modal with another infinitive uses the substitute infinitive müssen.
Er hat gestern arbeiten müssen.
Aha! See the common trap
Try thisEr hat gestern arbeiten müssen.
Do not use gemusst when the modal has a dependent infinitive in this standard construction.
More examples, less guessing
Er hat gestern arbeiten müssen.He had to work yesterday.