'File' class not found in submitForm(...) - uploading managed_file
You need to add it in a use statement in your class (at the top of the file with the rest of the use statements)

use Drupal\file\Entity\File;