Brent,
One of the things that a 2FA does is, drop a cookie in your browser using which the web application identifies if a given machine is a known one or a new machine and that's how the web application triggers the 2FA.
You can try creating a new WebDriver session by using a firefox profile. [ Launch firefox with a new firefox profile manually, mark the machine as a known machine by inputting the 2FA code and then close the browser ] . Now copy the firefox profile directory to your test code and use it to start a new webdriver session. This would cause firefox to use all the cookies that are stored in the given profile.
The catch with this is that this solution is confined to firefox and wont work for IE and Chrome.
On the other side, you can just enhance your test code that would leverage JavaMailAPI (Assuming you are using Java), wherein you would trigger a 2FA, fetch the code from the mail using the JavaMailAPIs and then input that everytime into your flow.
This would ensure that your test would now work seamlessly against both Chrome and IE as well.
Pick which works for you