Thanks for the code example.
I think the observed failure is due to the creation of a new dict, which will trigger a cope, wouldn’t it?
a = {'a': 1, 'b': 2}
a_ref = a
a_copy = {k: v for k, v in a.items()}

a_copy['a'] = 3
print(a, a_ref, a_copy)
> {'a': 1, 'b': 2} {'a': 1, 'b': 2} {'a': 3, 'b': 2}

a_ref['a'] = 4
print(a, a_ref, a_copy)
> {'a': 4, 'b': 2} {'a': 4, 'b': 2} {'a': 3, 'b': 2}

In the first example, you are comparing the same internal state_dict, while the second code snippet created copies of all values.