Finally I found the cause of the problem. It was an old Autohotkey script that I installed several years ago and forgot about it. I can not understand why it caused problems only on Emacs 30. Sorry for bothering you

вс, 31 авг. 2025 г. в 14:34, Eli Zaretskii <eliz@gnu.org>:
> From: Alex <al2255668822@gmail.com>
> Date: Sun, 31 Aug 2025 14:08:51 +0300
> Cc: Po Lu <luangruo@yahoo.com>, 79348@debbugs.gnu.org
>
> A: Dragging with the mouse the mode line between two windows does not work.
>

>
> Works as expected:
>
> Interactions with the menu (File Edit Options …)
>
> Interactions with the scrollbars
>
> Resizing frames
>
> Hovering over elements changes the mouse cursor, shows tooltips and feedback.
>
> Switching between frames via mouse clicks inside frames works as expected, but switching between windows
> by mouse clicks inside a frame does not work.

T^his basically means that the mouse works only when the click goes
directly to Windows.  Any click or drag that should be processed by
Emacs doesn't work.

> Q: In "Settings -> Bluetooth & devices -> Mouse", review all the settings, especially the ones in "Additional
> mouse settings".
>
> A: Reviewed. Standard mouse settings
>

>
> Q: Can you try with a different mouse, like a simple optical mouse connected via USB?
>
> A: I tried with a simple optical mouse connected via USB (Logitech). The situation is the same

So this must be something system-wide, not specific to the model and
make of the mouse.  Hmm...