“Modern warships don’t need to get close to shore to attack a smaller ship.”
This depends on the size of the smaller ship and the weapons available to the attacker.
You might recall that up until the Trump Administration that US warships in the Arab Gulf were typically helpless against small Iranian boats of less than 15 meters in length. Trump had the Navy deploy old fashioned mount .50 weapons and gave the Navy authority to use them which fixed that problem.
The Russian ship was probably configured for taking on ships similar to itself and the smaller ship posed problems for target acquisition.
Had this encounter been out at sea instead of close to shore the Russian ship would have no doubt eventually won the day against the smaller ship. But unbeknownst to the Russian skipper his enemy was not the smaller ship but instead a very adequate shore battery.
Yeah. Remember the Cole?