Stop making iPhone constantly change sound volume on its own?
Update: See @Andreas' answer below - iOS 14.4 addresses this issue by allowing the user to specify what kind of device are they listening to. The loud volume notification features still cannot be turned off, but with the right settings, the notification will no longer lower volume automatically. I am currently on iOS 14.4 with iPhone 8 Plus in EU region and I can confirm that I can set my BT devices as external speakers or car stereos, so that they do not have their volume lowered.
-- Original answer:
In addition to @grg's response it is worth noting that this feature doesn't work properly at least in following circumstances:

You are using your phone in a car, where bluetooth car radio is registering itself to the iPhone as bluetooth headphones.
You are using non-Apple headphones.
You are using home appliances, such as external bluetooth speakers, which register to the iPhone as bluetooth headphones.
You have a hearing disability and need to set high listening volume in order to hear anything. You currently have no way to listen to music (or anything, actually), since iPhone will automatically lower the volume.

In these cases, iPhone will determine you are listening to music too loud and will turn the volume down. This cannot be turned off. The screen in your Sound &amp; Haptics setting screen explicitly states these notifications cannot be turned off. This feature was introduced as part of iOS 14, but the inability to turn it off was introduced in iOS 14.2.
I can confirm the above scenarios from my own experience with JBL external speaker and bluetooth receiver I use in my car.
Some users and articles claim that this feature is based on legal requirement in EU and elsewhere. I reside in EU and I was only able to find EU recommendation on hearing protection in mobile devices. I couldn't, however, find any regulation that would make it mandatory for phones to have mandatory automatic volume controllers that can't be turned off. Follow-up discussion is available at Apple forums. This change has arguably created massive amounts of e-waste, since every BT gadget from AliExpress that allows you to use bluetooth in your car has been rendered useless, as well as many, if not most, external speakers and sound appliances on the market currently.
I have no idea why anyone is defending this or why anyone would think I am too incompetent do decide for myself how loud I should listen to music. It's totally broken, not mandatory and dumb idea to begin with even if it worked flawlessly.
Other helpful opinions on how this broken feature affects people's lives:

User with experience in concert industry explains how this affects ability to reproduce music with DAC converters and provides evidence that it is not the loud music but screaming people that damage people's hearing at concerts.
User that drives motor bike explains how iPhone automatically lowers his volume when listening to traffic information and navigation, which introduces hazardous situations with potentially fatal accidents when people need to stop focusing on the road and start fiddling with their phones while driving.