I don't think there's a general solution for this issue. Content blockers need to provide a workaround for each situation, if at all possible.
At least it's possible to contribute to uBlock Origin's filters.