Hey there,
This issue can occur if you attempt to change the settings and recompress animations while compression is happening. We are missing some context from the code you provided, but IsCompressedDataOutOfDate might return true while compression is ongoing from another source.
To help with this, as an example, In the ACL Stats Dump Commandlet, after loading we we wait for compression to finish with UEClip->WaitOnExistingCompression(), which is triggered from in post load of the anim sequence. Then later, to trigger compression we call UEClip->CacheDerivedDataForCurrentPlatform(); which will check if the current data matches and recompress if it needs, waiting on the result. You could follow something similar to make sure you not compressing at the time.
Dustin