Excellent application, just one thing I'd like to point out:
In this instance you are correct that player A cannot immediately return, however you mention "before the raid is completed". If player A is to wait the 3 minute NLR timer then player A is allowed to return their base. If player B is still raiding, or any other raid participant, than they may try to defend their base again.
+1 your activity is fantastic, you have no active warnings, and while I haven't interacted with you much, I haven't seen any negative interactions with you and the community; in fact, you seem to be well liked.
Good luck!