The solution of the issue is to create an empty database and make a backup of that then tried to restore the backup on the database stuck in restoring mode. Set these options on the restore:
First, the recovery state needs to be RESTORE WITH RECOVERY. Second, the “Overwrite the existing database” option needs to be selected.