The attack was the latest effort to inflict pain on Russia even as Kyiv is losing ground on the battlefield at home.