The background is copied at the time of the card flip and doesn’t wait for any changes made via JS afterwards.
We could troubleshoot this, but I think it will be easier for you to just wait for the next big Anki update, which will not have the issue to begin with.
For now you could hide the toolbar during review (there’s a setting for that in the preferences).