Yes, This is a bug. It happens when you click a picture while listening to music on headphones. Hope it will be fixed soon.
Putting the phone on 'Do Not Disturb' mode didn't help.
I also suggest you to post such questions in the specific phone page discussions to get quicker replies. (Example - For Nokia 5 - https://community.phones.nokia.com/support/discussions/forums/7000004251)