I'm using TeXLive 2020 on Debian Testing, and LyX 2.3.5.2. I wrote some notes for a course I'm teaching, in LaTeX, using UTF8 encoding (default). When importing to LyX, I cannot compile it to PDF because it imports the characters wrong; I attach screencap of this at the end.
I have repeatedly set UTF8 as the default enconding for documents at Document>Settings>Language, but this changes don't seem to persist; I also added \usepackage[utf8]{inputenc} to the default preamble, and LyX saves this into its settings, but on Importing from LaTeX source, I get the same characters shown in the screencap.
I use LyX because it is a nice environment for student who don't know LaTeX yet, and don't have time to learn it during the course. They have reacted positively to LyX, and they use it for their turn-ins. So I give them the notes in LyX so they can edit them for their own use.
EDIT: I tried the solution on this question, but I still get the funny characters.
EDIT2: Added forgotten screencap.
Any ideas? Thanks!

\usepackage[latin9]{inputenc}is present in the TEX file when I reimport it to LaTeX from LyX. I have been looking at the preferences for a few minutes now but I cannot figure out where to change that.