It has already been established that when a Jedi becomes one with the Force, that they (sometimes) take physical objects with them. Yoda goes with his robes and his necklace.
Kenobi, by comparison, seems to have left his robe as a distraction to Vader so it's certainly possible that a Jedi can choose what to take with them. Presumably Luke wanted to take his creepy robot hand for sentimental reasons.
It may amuse you to learn that the writers actually gave this question serious consideration.
Q: So Luke has a metal hand and passes into the Force. Does the hand go with him when he goes? Does he get a new hand? WHAT HAPPENS?
Mark Hamill: Me too. Let me know if you get an answer.
Rian Johnson: In the edit room someone joke suggested that when he fades away his robot hand should clank down onto the rock.
Might have undercut the moment. 😂
Danny Zuker: This was a significant debate in our writers’ room.
I was in the anti-clank camp.