This has been an ongoing issue with MacBook Pros for many years now. I've seen the exact same behavior on my 2015 15" with dGPU: as soon as I plugged in the external 27" 4K display the fans went completely bonkers regardless of resolution. The difference between both internal and external on scaled resolutions and internal and external on "Optimal for Retina" (aka Default for Display) resolutions was negligible. The MacBook Pro became noticeably quieter in clamshell mode but still far from acceptable. If, however, you plug in a LowDPI non-Retina screen, such as a 32" Ultrawide, it remains cool and quiet. I'm really disappointed to see this is still an issue in late 2019.
Op, you could try one thing to verify this: open system preferences, go to Displays, then hold down the Option key while klicking on "Scaled". This should give you various resolutions to pick from. Now enable the "Show low resolution modes" option, which will give you LowDPI as well as HiDPI resolutions. Pick the corresponding low resolution to your current HiDPI resolution, e.g. 1920 x 1080 (low resolution) or 2560 x 1440 (low resolution). Image quality is going to be abysmal but that way you'll be driving your external display in LowDPI instead of HiDPI mode and should be able to notice a significant decrease in fan noise within a few minutes if not seconds.
Op, you could try one thing to verify this: open system preferences, go to Displays, then hold down the Option key while klicking on "Scaled". This should give you various resolutions to pick from. Now enable the "Show low resolution modes" option, which will give you LowDPI as well as HiDPI resolutions. Pick the corresponding low resolution to your current HiDPI resolution, e.g. 1920 x 1080 (low resolution) or 2560 x 1440 (low resolution). Image quality is going to be abysmal but that way you'll be driving your external display in LowDPI instead of HiDPI mode and should be able to notice a significant decrease in fan noise within a few minutes if not seconds.