Stop me if this sounds familiar: You've set up the perfect video shoot, you've got the best audio track playing as background, you fire up the Camera app on your iPhone, you start the recording...and then the music dies. Once again, you've forgotten that the iPhone does not allow for audio playback while shooting video with the Camera app.
It does make some sense in some situations — presumably when you want the video to record environmental sounds — but in others, you just want to shoot the video with an audio track as background in the most simple manner possible.
Now, in the latest iOS 18 beta (as noticed by MacRumors), you can do so. To enable this, go to Settings - Camera - Record Sound and make sure that the "Allow Audio Playback" toggle is on.
Due to the proximity of the iPhone's speaker to its microphones, the results won't be perfect; I've tried it out, and the audio in the resulting video can be a little harsh. To get the best result, you might want to turn down the audio volume a little before starting your recording.
The feature is currently only available in iOS 18 beta, but it should become available for everyone when the final version of iOS 18 becomes available in the fall.