The Geneva Convention prohibits the use of human sheilds. From the Red Cross:
The prohibition of using human shields in the Geneva Conventions, Additional Protocol I and the Statute of the International Criminal Court are couched in terms of using the presence (or movements) of civilians or other protected persons to render certain points or areas (or military forces) immune from military operations. Most examples given in military manuals, or which have been the object of condemnations, have been cases where persons were actually taken to military objectives in order to shield those objectives from attacks.
There have recently been claims that the opposite can constitute a war crime, where the placing of weapons within cities has been interpreted as breech of this law. Examples include this page blaming Ukrainian forces for putting military equipment within residential areas of Kharkiv and this page blaming Hamas for operating in built-up residential areas.
Ukrainian Armed Forces place 122mm D-30 howitzers in residential areas
Soldiers from the 92nd brigade of the Ukrainian Armed Forces hiding behind the backs of Kharkiv civilians
Palestinian fighters are clearly operating in built-up residential areas and have positioned tunnels, rocket launchers and command and control infrastructure in close proximity to schools, mosques and homes.
Obviously these conflicts are vastly different, but they share features. In both cases we have a relatively weak force largely restricted to urban areas facing an opponent using a vastly superior air and artillery force. While in both cases the military equipment could be placed in the open outside of the cities, if they were the equipment would be expected to be destroyed quickly. I cannot think of a conflict where this was done, whereas the converse seems universal.
Is there anything that clarifies international law in this area? Have there been cases where a party was found to have breached this by moving weapons to residential areas, or found not guilty when facing such a charge? Is there anything else that could guide interpretation?