It should not be a problem with 5K monitor because I've tested that on my Macbook Pro Retina, which doesn't have 5K monitor and same problem occured.
And yes, I work with High Sierra, but it worked just fine when I upgraded to High Sierra. This problem occured about a month or two months ago.