I came across the same issue with Native trainer, when I wanted to use it.
BUT
I found a solution!!!
I used this old ask Ubuntu thread: LINK
Keep in mind: I did this on GTAV installed from the Epic Games Store through Lutris.
Instructions:
Install Script hook and Native trainer as you would do on windows
open the wine configuration of GTAV's wine prefix
go to libraries
In the New overreide for library field select dinput8 from the drop-down menu and clik add
Apply the changes and close the window
Enjoy the trainer!!!
I guess if you install any mod, that uses custom windows system dll (just as Script Hook does with dinput8.dll), you just need to repeat these instructions for that specific dll.