Honestly, I don't know. I'm using XFCE, which is not an unusual window manager. I can try and change some settings if you can suggest to diagnose the issue. I believe the ebuffers code has changed recently. It used to work without issues in emacs 27 or 28 (I don't remember which).

On Thu, 28 Mar 2024 at 10:28, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Vangelis Evangelou <evangelou@gmail.com>
> Date: Thu, 28 Mar 2024 10:08:51 +0000
> Cc: 70046@debbugs.gnu.org
>
> Because the cursor moves to that buffer and if I press n or p it inserts in that buffer. Here is a video
> demonstrating this
> https://drive.google.com/file/d/1E7ycJJTYuo62MwViGfiYz_tnornMdXkN/view?usp=sharing
>
> Also, note in the video that the mini frame goes under the top bar. I don't know if that's an emacs issue
> though.

Then I definitely cannot reproduce this.  Could this be because of the
particular window manager you are using and/or your system-wide
settings of the window manager?