Hello alena96,
If the AirPods are pausing only until you dismiss the alarm, and then the music starts again, this is expected behavior. If you wish to have this behavior changed, or options to change it yourself, you may want to visit Apple's Product Feedback page, and offer your suggestions there. Here's a link to that page: Product Feedback - Apple.
If the music does not automatically start again when the alarm is dismissed, you may want to try the following steps:
- Restart the corresponding device.
- Make sure the corresponding device has the latest OS software.
- Reset the AirPods and reconnect them; How to reset your AirPods and AirPods Pro - Apple Support.
If this does not resolve the issue, you may want to reach out to Apple Support directly. You can reach out to them by clicking here: Contact - Official Apple Support or over the phone by calling the number that is most local to your region: Contact Apple for support and service - Apple Support
Take care!