A care home where residents were found to be living “restricted and isolated lives” is set to close after a second inadequate rating by inspectors.