At "File -> Convert/Stream" menu item, applying "Video - H.264 + mp3 (mp4)" profile will result in a file in m4v format instead of mp4!
Now, changing the extension from m4v to mp4 will work on some devices, while others the audio will be corrupted.
Is there a way to produce a genuine mp4 format file from VLC? If not how to reliably convert m4v into mp4?
When applying "Video - H.264 + mp3 (mp4)" profile make sure you tick "Keep original audio track" box under Audio codec tap. Then rename the output extension from m4v to mp4.
It should now work as a normal mp4 on different devices.