Occasionally the inventory will get stuck in a state where it won't close via the 'exit' button. I've seen this happen without using the steam overlay, but the overlay is the easiest to repro it.
1) Open the inventory (via the tab button)
2) Hit shift + tab to enter Steam Overlay
3) Close the overlay
4) You will return back to the game. At this point, if you try to close the inventory it will not close.
It's worth noting that after step 4, if you hit the tab button again and then the exit button, the inventory will correctly close. It is as if the game forgets it is displaying the inventory when you go into steam overlay.