Official rule text
74.3 Die rerolls must occur after rolling the dice, before other abilities are resolved. 77.3 STEP 1—ROLL DICE: The player rolls dice for each of their units in the active system that has the “Space Cannon” ability; RELATED TOPICS: Abilities, Action Cards, Ground Combat, Space this is a space cannon roll. One hit is produced for each result
View official source
Source: Twilight Imperium: Fourth Edition - Living Rules Reference: Prophecy of Kings
Expansion: Prophecy of Kings
Version: 2.0
Reference: Rule 74.3