How to crop image to masked area to opencv python?

I have an image mask for hand extracted from an input image.

This is the input hand mask.

This is the input hand as RGB.

I want crop this area out of the image.

Now what I want to do is somehow crop the input hand as RGB to not contain the blackish area on top. The blackish area on top is actually an artefact from the real image and exist due to incorrect segmentation accuracy in some cases. I want to crop that out of the image or the mask. I need an idea whether this can simply be done with CV or should implement some deep learning model for that as well.