its the "in the act of shooting" that gets the refs.
if the shooter is fouled in the act of shooting then continuation is allowed and points count.
Can be a 4 point play.
If the non-shooter is fouled , while the act of shooting is incomplete - the continuation is waived off - the max penalty is 2 shoots to the fouled non-shooter and shot does not count. Ive seen that called
(Lets ignore flagrant/intentional/etc off - the -shootere fouls FTM.)
the heavy one both happening at the same time, two defensive fouls, the continuation points are allowed,the shooter gets a bonus, then the fouled non-shooter gets 2.
ive seen that happened and called.
The one i like and have seen called, is a 5 point and possession play. Shooter hits the 3, gets fouled unsportmanlike after fully completing the shoot ( landing etc) so points count, 2 bonus and possession - up to a 7 point possession play to the offense.
Seen it once, but the player had to explain it to the ref to get it as they were initially only going to award a single bonus :)