Hi Danila Chepurko,
Thank you for reaching Microsoft Community. We appreciate for sharing your concern to us.
Microsoft doesn't formally advise storing the Slim Pen 2 by attaching it with the magnet near to the Surface Pro 9's charging port. The Surface Pro Signature Keyboard, the Surface Slim Pen Charger, or the Surface Duo 2 Pen Cover are all approved ways to charge the Slim Pen 2.
- Can you confirm that it can be magnetized and attached close to the charging port?
It may be practical to use the magnet to secure the pen near to the charging port, however it is unclear whether doing so is secure for either device.
According to this article, the Surface Slim Pen 2 can only be magnetized to the Surface Pro Signature keyboard.
Kind regards,
Lavenia