SMB should be case insensitive, but case preserving. At least with Windows and macOS clients.
On the other hand, TrueNAS is not case preserving with macOS clients (I have tested with 12 Monterey, 14 Sonoma and 15 Sequoia BETA).
I have tried to use the default configuration. That is:
Create a local User, activating “Samba Authentication”.
Create a dataset (using the “SMB” preset) → So it will be casesensitivity insensitive and aclmode restricted.
Start the vanilla “SMB” server (all default, even without using “Enable Apple SMB2/3 Protocol Extensions”, although this does not change the result).
Access from macOS, using the Finder, and the user created in point 1.
4.1. Create a directory called test (all lowercase).
4.2. Try to rename it to Test (i.e. first letter in upper case).
4.3. The renaming seems to work, but…
4.4. …immediately, it fails silently and the name reverts to test (all lowercase).
So now rather than getting a handle with the name returned via the directory listing it just performed (foo), it’s using using Foo and then renaming to Foo which hits a micro-optimization in samba for when a client tries to rename a file to its current name. Since our SMB CI tests do the sane thing (use the file name returned in the dir listing) this issue was not caught.