That does not work on macOS. "-i''" is the same as just a bare "-i", and it will then interpret the next argument as the backup suffix.
echo foo | sed -i pattern
echo foo | sed -i .orig
But you can still use "-i.orig"; that should work on both. That will leave you with a .orig file to clean up, but arguably that's not a bad thing as -i can clobber files.