Over updates, this problem has gone away.
Temporary Workaround
Toggle the iPhone ringer/silent switch. This isn't a permanent solution, but it stopped this bug from occurring for at least 3 days now.
Notes
I ran into this bug during the iOS 17 Public Beta testing in July 2023 but only came upon this solution last week. If you are using a wireless or MagSafe dock at a desk like me, you'll find this bug pretty quickly and it'll quickly become obnoxious.
After moving from one public beta version to another, I would see the issue temporarily disappear. This originally seemed as if they fixed it, but I think the device restart is what momentarially made it go away.
For the charging chime, it appears as if the chime that triggers when the phone starts charging tries to play while the ringer/silent switch is set to silent. I have no idea why this would have any effect on the sound when it is taken off the charger.
There doesn't seem to be any other setting that affects this, but I welcome feedback or alternate answers.
2023-10-25 Update: This may not work on iPhone 15 Pro Max
I recently ran into this issue with the new iPhone 15 Pro Max. Since I had reconfigured the action button, I could not toggle silent from there. Toggling silent mode via Control Center did not fix this bug like it did on my iPhone 14 Pro Max. Unfortunately, I was not able to continue troubleshooting during this instance on iOS 17.0.3.
More testing is required. I will update if I discover a solution that works consistently for this bug on iPhone 15 Pro Max if it occurs on iOS 17.1 or later.
References
I only briefly searched online for answers before I thought to toggle the ringer/silent switch. The only pages I visited from a Google search are a Spotify support page, the iOS subreddit, and an Apple Support post, but these do not appear to suggest toggling the switch as a solution.