Only time I've seen this happen is if you manually deleted the game instead of uninstalling it properly. For Steam we read the registry entries Steam writes to your system that tells Steam whether the game is installed or not to determine the install state, and for Epic we read the file they save on your computer with the same information. We use the same information the launchers use to determine if a game is installed or not. You may need to open up Steam and Epic and let them resync their files to determine that you removed them from your computer and update the system files they save the information in.