According to the BBC it was a real person, not a doll:
The first online post I saw about Omar's death was from a pro-Israeli account on X (formerly known as Twitter). It included a video, featuring a man in a grey polo shirt holding a small child's body, wrapped in a white blanket or cloth. I would later discover this child was Omar.
In the accompanying caption, the person who shared the clip declared: "Hamas is desperate!" They added falsely that the group - classified as a terrorist organisation by Israel, the UK and other powers - had "released a video showing a dead Palestinian baby. But wait for the catch. It's not a real baby; it's a doll".
According to X, that post containing the video and false claims has been seen 3.8 million times. The allegations it made were then amplified by the State of Israel's official account on X.
It shared a new post, this time featuring that same video of the child in the white blanket - and then a still from the same video, circling the child's face.
In the caption, the account wrote: "Hamas accidentally posted a video of a doll (yes a doll) suggesting that it was a part of casualties caused by an IDF [Israel Defense Forces] attack."
I tracked the original footage back to the Instagram page of a Palestinian photographer, Moamen El Halabi. He filmed the original video of the man in the grey shirt holding Omar, and I got in touch with him.
I also made contact with another photojournalist, Mohammed Abed - who works for the AFP news agency - who was there at the same time. He took a photograph of the same man holding what appears to be the same child, wrapped in the white sheet. That photo has since been uploaded to the Getty Images website. [...]
They both told me, categorically, that the child pictured had not been a doll, but a real little boy - Omar Bilal al-Banna. They also shared additional images, which I have matched up with Moamen El Halabi's original video footage to verify the child's identity.
[...] It seems that part of what made people think what they saw was a doll, rather than a child, was the colour of Omar's skin in the photograph. But Mr Abed said he had photographed several children killed in strikes in Gaza and their skin looked similar.
FWTW, there is also a photo in the piece showing Omar's complexion while alive.