The music doesn't play for the whole video

The soundtrack may have been added to a photo (element) instead of having it placed as a soundtrack for the whole video

In order to have your soundtrack play during the whole video, you need to drag the soundtrack element to the movie soundtrack placeholder  above the photos in the editor.