They don't wear uniforms because they don't want to be distinguishable from civilians.
@noblegiraffe
100% you are correct. Some do wear a military uniform of sorts, but most do not wear a uniform and it is, as you say, specifically because they want to make it more difficult for IDF to identify them. This is a challenge for IDF and not an exception to international law that then allows IDF to shoot anyone over 3ft tall that they see. The IDF drones, artillery, tanks, fighter jets, navy gun ships and such are a challenge to Hamas, which similarly does not except them from international law. This is an asymmetrical war.
Only state rank and file militaries are required to wear uniforms, this does not apply to groups like Hamas. The requirement to wear a uniform also doesn’t apply to state special forces or guerilla/resistence/civilian militia type fighters either. Hamas, being outnumbered by a factor of 10 to 1, is going to operate as if they were guerilla or special forces fighters to even the asymmetry a bit, just because they are terrorists it doesn’t mean they are not going to exploit every advantage they can have by not being an official state military.
It’s never been the case that 100% of combatants wear a uniform in the history of wars. That’s one of the reasons why a number of civilian casualties is recognised to be unavoidable.