I dislike him wearing a mask or
I dislike his wearing a mask?
I think the second sentence is correct because the possesive adjectives (e.g. my, your, his, her, its, our, their etc.) precede the gerund
. for example:
1. He insists on you
leaving the town- is not correct.
2. He insists on your
leaving the town - is correct.
Him is one of the complement pronouns (e.g. me, you, him, her, it, us, them etc.). Complement pronouns take complement position and complement a verb or a preposition. for example:
Uma told him
Ram gave me
Ram will present his after him (Shyam).