The idea that you could not have acted differently after the act has occurred is a modal fallacy. Which means you could have acted differently before the act occurred.
One must not conflate contingency with necessity.
The modal fallacy is in assuming that one could not have acted differently based on the fact that one did, in fact, act in a specific way. That is neither here nor there with respect to the argument I am advancing -- which, again, is simply an argument about the logical consequences of presuming the existence of a perfectly deterministic universe, and not an assertion that the universe is, in fact, perfectly deterministic (which may or may not be the case).
I am not arguing that the mere fact that someone did something means that they could not have done differently. To draw that conclusion from that premise would, in fact be a modal fallacy. Actually, it would be an even greater fallacy of arguing a conclusion from a single premise.
What I am arguing is the following:
Premise 1.1: Determinism, to be true, requires that all activity, including human cognition, is, at all times and in all places, inexorably determined by antecedent activity such that any given activity, including human cognition,
cannot be anything other than it is (and was so before it even occurred).
Premise 1.2: Free Will, to be true, requires that a human being have the capacity to act (or, at least, to decide to act) in a manner that is not inexorably determined by antecedent activity.
Conclusion 1: Free Will is false if Determinism is true.
Conclusion 1 / Premise 2.1: Free Will is false if Determinism is true.
Premise 2.2: Compatibilism, to be valid, requires that Determinism and Free Will can both be true at the same time (and in the same universe).
Conclusion 2: Compatibilism is not valid.
Again, I am not arguing that it is a fact that any act could not have been different before it occurs based on the fact that it does occur. I am arguing only that hypothesizing it to be true that an act could not have been different than it occurred simply because it did, in fact, occur, necessarily leads to the conclusion that Free Will (as opposed to the illusion of Free Will) does not exist. And to be clear, the premise of determinism is for all worlds and all times, so it is not an argument that the conclusion fails based on a allacy that the conclusion fails to take into account other worlds and/or times.