Thanks for reaching Microsoft Community, Iurii_Zaitsev. We're sorry to learn about this issue on your pen.
Since replacing the battery did not help, then we know this is more likely a hardware problem on the pen. You may want to consider replacing the whole pen instead. For further assistance, kindly contact Microsoft Surface Support to seek exchange options for your pen. If you're located outside United States, see Global Support. Replacement cost applies to out of warranty device and for further service.
Best regards,
StevenK