Hi paulfromcambria heights,
Thank you for participating in the Apple Support Communities. We understand your iPhone's volume is changing on its own. You'll want to make sure Attention Aware is turned off by following the steps in this article: Turn Attention Aware features on or off on your iPhone or iPad Pro.
"What are Attention Aware features?
Even if you don’t enroll in Face ID, the TrueDepth camera* intelligently activates to support Attention Aware features. With Attention Aware features, iPhone can check whether you’re paying attention to your device and automatically take action. For example,
- When you’re looking at your device, your display will not dim until you stop looking at your device.
- If you're looking at your device, it will lower the volume sound of your alerts.
If you don’t want to use these features, open the Settings app, tap Face ID & Passcode, then turn off Attention Aware Features."
If you've you've already done that, and you've restarted your iPhone and the issue persists, Contact Apple Support for further assistance.
Take care.