Thanks for the reply Scott --
The first solution in that post, which I had tried previously, involves adding a \ to escape the single quote, however when I do that the flow then attempts to escape the \ on its own, messing up the comparison

The second solution in that post was a nonstarter, and far more complicated than I felt it should be.
After spending a questionable amount of time on it, the solution that eventually worked for me was to do replace(attribute,'''','''''') so that the Filter Query expression would successfully compare the two values.
It would be nice if something like a single quote in a string would knowingly cause issues in a Filter Query expression, that Flow would know to escape it on its own instead of requiring the user to kludge a fix on their own.