I had a similar problem. I asked for explanation and documentation in a thread SMB mangles long file names to DOS8.3! Why? Have I fixed it? from August 2024. I got some replies from an iXsystems person who I believe is quite knowledgeable, but they did not really answer questions about what TrueNAS control exactly governs this behaviour.