Production siteUrl being used in staging environment
I found an existing solution to this. It turns out the order of the file matters and due to the "partial-match", my siteUrl was being set to the staging url and then overriden with the production url.

Proper order of multi-environment config

I'm going to use the solution outlined here
https://craftcookbook.net/recipes/foolproof-multi-environment-config