As I wrote on https://github.com/pdfminer/pdfminer.six/issues/1056#issuecomment-2504352023
The handling of unmapped glyphs is a method on PDFLayoutAnalyzer
which can be overriden in a subclass or patched at runtime. So you can do this in your code for instance:
from pdfminer.converter import PDFLayoutAnalyzer
PDFLayoutAnalyzer.handle_undefined_char = lambda *args: ""