Hi Jd6885,
welcome too the Apple (user-to-user) Community.
Re: My airpods pro 2 constantly disconnects from my m1 macbook pro.
Sounds like there may be some sort of interference .
You may just need to check that there is no wireless interference or any obstructions between you and your device:
Eg:
What to do: If the sound from your wireless headphones cuts out or is distorted – Apple Support
or
How to: Resolve Wi-Fi and Bluetooth issues caused by wireless interference - Apple Support
Eg: says
"Avoid using your wireless devices near common sources of interference, such as power cables, microwave ovens, fluorescent lights, wireless video cameras, and cordless phones".
Resource: AirPods User Guide – Apple Support
More support / info:
Find all the topics, resources, and contact options you need for your AirPods....
AirPods Support - Official Apple Support
All the best :-)