Clicking anywhere outside focus group to make it hide/close

default behavior is to close it when click outside of it, so if that is not working you should create a bug report.

In terms of getting it to close on a second click of the icon you could follow this post

but another approach could be to set things up so that when you click the icon to show it, you hide that icon and show a “second” icon…on the click of the “second” icon the workflow to close the group focus should work.