This happens in 5.1.2 and still in current master from ~1 week ago. Edit some file. Then open the context menu in the editor window and do git->commit. Complete the commit. The diff keeps open, and the edited file. But it does not change back to the normal project view, i.e. all other opened files are closed.
Still happens with 5.3.0.
I can't reproduce this with 5.3-git. After completing the commit, the normal open tabs are returned as expected.
I also can't reproduce it with 5.3.0 exactly (built locally on Arch). Git version is 2.20, but I'd be surprised if that makes a difference.