I tried the above on a List Rows function for Dataverse. It came back empty with a 200 result.
I succeeded by replacing the apostrophe with a blank (eg, removing the apostrophe); then I got the function to list actual records instead of a 200.
replace(variables('varApostropheText'),decodeUriComponent('%27'), '')