Well, that's odd – the Group command too !! 😉
I hope you can understand we need a little more information about the situation, because under normal circumstances, it would work correctly. What are you doing, which version of XD, on which system ?
Do you have at least two elements selected, e.g. a freeform shape and an image, on top of eachother ?
My XD is the letest version. And I have selected two simmilar shapes with different color but I could not mask them. I know this feauture in photoshop but here in XD quite different.
1.Draw rectangle and Elipse
3 Right click on selected shapes and choose Mask with Shapes.