How can we force MacOS to forget that a specific file was downloaded from the web?
You can delete the download source by running

xattr -d com.apple.metadata:kMDItemWhereFroms FILENAME


To also remove the quarantine flag use

xattr -d com.apple.quarantine FILENAME


PS: If FILENAME is an application (ends in .app), add -r to have the attributes removed from all files within the application.