[Perhaps a sniper is, by design, hidden in leaves, brush or other kinds of camouflage? Wouldnt it be useful to destroy the attacker before more soldiers were hit? If a small area of attacking fire were precisely identified, perhaps the recon unit could call for immediate air support to blanket the enemies with suppressive fire from above?]
...and since 1948, the Carl Gustaf, a shoulder mounted recoilless rifle that has seen a resurgence of use in Iraq and Afghanistan:
Sgt. Femath Shooting Carl Gustaf at Enemy Taliban Sniper:
https://www.youtube.com/watch?v=ukMpiPFJO54
U.S. Army buying the latest iteration of the Carl Gustaf recoilless rifle:
https://taskandpurpose.com/military-tech/army-carl-gustaf-m3e1-upgrade-contract
Raytheon has developed a guided projectile for it (might help to keep your head down while firing):
https://www.raytheon.com/capabilities/products/guided-carl-gustaf-munition