its normal it changes OT name to pkhex, to avoid that make a folder named trainers on PKhex folder
place 1 .pk9 file (the pokemon must be captured by you) and go to auto legallity plugin settings, and in the lowest part, says "usetrainerdata" must be true