Hi,
To my knowledge, there is no way to force the rules fire after the code. If you want the rules to be executed after the code, then add the code to execute the same result as what the rules are doing. For example, if you are setting a field value in rule, add that in the code.