M1 MacBook Air bluetooth becomes extremely unstable when connected to external monitors
I just got my new M1 MacBook Air a few days ago, and before that I used an intel MacBook Air. I usually use a usb-c hub to connect my laptop to an external monitor, and use a bluetooth keyboard and Magic Trackpad, and this worked well with the intel MacBook. However, with the new M1 MacBook, the bluetooth connection becomes extremely unstable. About half an hour after using this way, both the Trackpad and the keyboard disconnect at the same time, and I am unable to reconnect them unless remove my laptop from the monitor. Strangely, upon the removal, all the things go back to normal. This issue is really frustrating because I need a bigger monitor to work efficiently. I'm not sure from which part does the problem come from since I didn't encounter it with my intel MacBook. I have looked up on the community but didn't see any similar problem.
My setup are as follows:
Laptop: M1 MacBook Air 13'
Trackpad: Apple Magic Trackpad
Keyboard: Keychron K6
Monitor: Samsung M5
Usb hub: Kingston Nucleum
MacBook Air (2020 or later)