Getting Error #101: UI.Vision RPA is not connected to a browser tab

Getting this while running a macro…Sometimes browser gets closed and we get this error.
Error #101: UI.Vision RPA is not connected to a browser tab

This is not a solution