Tag not monitored by Microsoft.
No, this is not a bug in the ODBC SQL Server Driver 17. I don't work with ODBC programming myself, but I am confident that the ODBC driver is perfectly able to insert to transport Unicode characters correctly.
So MariaDB is the prime suspect. I guess that MariaDB uses UTF-8 for Unicode. The problem is what MariaDB tells the ODBC driver about the data. If MariaDB says that this is SQL_C_WCHAR (or what the type indicator may be) and then sends UTF-8, the ODBC driver will send the UTF-8 sequences as they if they were UTF-16. But, wait, that is not what is happening there, because then you would have seen Chinese. No, MariaDB just sends them as char, but without any character set conversion.
Anyway, I think you will need to explore the options for ExternCommand on MariaDB.