Post History
The phrase "in doing so" implies that the action happens naturally as a consequence of the prior action, whereas "by doing so" suggests that the action is intentional to achieve a specific result.
Answer
The phrase "in doing so" implies that the action happens naturally as a consequence of the prior action, whereas "by doing so" suggests that the action is intentional to achieve a specific result.