That does seem to be a possible workaround. I guess it's because a
positive lookahead doesn't actually remove the footnote marker -- just
pokes at it to see if it's there, so to speak. Whereas in my version,
InDesign is probably actually removing the footnote marker, and then
trying to replace it. But of course, while that may work with most
things, the moment you remove a footnote marker, you've lost the
footnote. So trying to replace it with $1 causes some kind of error.
One would have to be aware and mindful of the bug, though, to remember
to use the workaround. Not ideal!