There is no semantic difference in your example, but consider this one:
Sie gab mir das Buch, dabei bemerkte sie, dass der Umschlag verdreckt war.
Wobei only states that things are happening at the same time, dabei can also imply that the second action is a consequence of the first one. Therefore, dabei is preferable in this case. Be aware that this is just a weak additional meaning, the main meaning still being “at the same time”.
Both words are equally formal. Colloquially, wobei can also be used to state an objection or relativization:
Man kann hier gut essen, wobei man sagen muss, dass es ein bisschen teuer ist.
Edit: As Emanuel pointed out, while Duden claims this is colloquial, it is also used in written language. I changed the example to a better one he gave in the comments.