@wtedst Good news: there appears to be progress on this front! I filed this as SR-10605 almost two years ago and we've been pretty consistently working around it ever since. However, the discussion on the issue notes that the OSSA functionality added to Swift has made it possible to safely add the optimisation needed to make this code faster.
While Swift 5.3 is missing this optimisation, the current nightly build contains it. You can grab a copy of the nightly toolchain from swift.org or, if you're familiar with Docker, you can grab it that way (docker pull swiftlang/swift:nightly-focal). Running your example with the nightly toolchain prints:
true
true
The same is true for my (slightly more complex) example from the upstream issue.