This topic has sort of been covered in the below, so I'm guessing is a somewhat acknowledged problem, but I couldn't find a bug report which specifically stated this behaviour so I've created a new one. Apologies if this is not the correct way to go about this.
In Lightroom CC on macOS if I select a couple of hundred photos (a mix of raw CR2 and DNG files, as well as some HEIC files) then select 'Save To', then 'Original + Settings' and export only a small number of the exported raw files also have an XMP sidecar created with them. All of these photos have had metadata created, such as keywords and copyright information (however not all have had edits made to them).
If I select just a single image which failed to export an XMP sidecar in the above example, and follow the same steps of 'Save To' then 'Original + Settings', the CR2 file is exported along with the XMP sidecar file.
If it's relevant, the albums I'm exporting this from have been set to 'Store Album Locally' - however I believe I've seen this behaviour with albums not set to store locally.