Clear focused window property on window closed

Closes #3806