Thank you for the response Gerk but that doesn't seem to make sense. the Android client was sending the custom user agent header while pht was not sending it
I've found that different clients handle things differently. The only "workaround" that has worked for me is to let the Plex Media Server transcode everything by setting optimized_for_streaming to False (example).