My problem lies specifically in Safari. Here is a screenshot of the issue: https://i.sstatic.net/amPeA.png
To further investigate and experiment, I have created a fiddle at https://jsfiddle.net/hbadvb02/6/.
Interestingly, the code works perfectly in Edge, IE, Chrome, and Firefox. I find this inconsistency to be quite confusing and frustrating.
I attempted to resolve the issue by using
-webkit-transform: translate3d(0, 0, 0);
, but unfortunately, it did not solve the problem.