A. Check if the app has a background play option in its settings. Some apps require you to enable background playback to continue playing music when you leave the app.
If this option is not available, consider using a different app that supports background playback.
B. Ensure that your iPhone's settings allow background app refresh. Go to Settings > General > Background App Refresh and make sure it is enabled for the app.