#states not detecting a change to form via ajax_command_invoke
For those who might come across this post, I think the problem is related to these issues :


Display Bug when using #states &#40;Forms API&#41; with Ajax Request
FAPI #states: dependent element added via AJAX initializes incorrectly if dependee has been initialized earlier


I found the solution to my problem (close to this one) by reading them.

Actually states may be no longer valid after an AJAX modification because some elements are still flagged as already initialized by the states system. This case produces when just the dependee element or the dependent element is altered by the AJAX request, not both. Only a side of the relation is updated, the other side keeping its old information. Dependee and dependent are therefore no longer linked and the state has no more effect.