Hey there Will03,
From what we understand so far, your iPhone has no issues while connected/paired with other accessories when adjusting the volume, except for when using it with CarPlay. If our understanding is correct, then we'd like to help by providing the next steps to take as they address issues with CarPlay: If you need help with CarPlay Please keep in mind that the steps may require you to reach out to the manufacturer of your CarPlay stereo.
If the same issue remains after trying all of the steps above, then the next step would be to let Apple Support know what's been tried and go from there: Get Support
Cheers!