From personal experience search engines don’t honor 404 or 410.
I switched much of my personal site to returning 410 over a decade ago and Googlebot still returns on a routine basis re-requesting a document that hasn’t been on the site since 2012.
Out of paranoia I just checked and yeah, GoogleBot actual (and not the dozens of fakes) requested each 410'd URL at least once a month, some URLs get multiple requests per month. All have been marked 410 since 2014 or earlier.