What ability check is the most appropriate for disarming a weapon from a creature grappled by another party member?

It’s my first post here. I am a DM running a 5e campaign for my friends.

During our last session, the characters were surprised by a creature polymorphed to look like a friendly NPC. The creature took their friend’s weapon (a one handed mace) and was using it to attack them. One of the party members had jumped off a cart and put themselves and the creature into grappled and prone condition states on the ground.

A different party member approached and said “I want to grab the weapon from [the enemy] and toss it away.” In response, I asked for a Dexterity (Sleight of Hand) check to see if they could remove the weapon. Was this the best-fit ability check for this scenario?

My reasoning for the check was:

  1. The Grappled nor Prone conditions state anything about the enemy being disarmed or losing control of their weapon (Players Handbook, Grappled – pg. 290, Prone – pg. 292), so I saw the active fighting and resistance displayed by the antagonist as creating a situation where it wasn’t an easy feat to simply grab the weapon.
  2. I think the action would require precise, dexterous movement of the hand to grab it while the enemy flails and combats their assailant. PHB states Dexterity ability checks “measure agility” (PHB, pg. 173).
  3. Sleight of Hand use on pg. 177 of the PHB doesn’t state anything about removing a weapon, just subtly removing a coinpurse without the person knowing. However, I also interpret it as the ability to manipulate an object on another’s body in a tricky situation.

After thinking on it, I feel as though a Strength (Sleight of Hand) check may have been more appropriate because the PC wresting the weapon away was a dwarf not prone to stealthy actions, but I would love some feedback on more specific rulings I’m missing.

Thank you for any help you may provide.