If your goal is you make a sysbot via RAM editing to inject the mons for trade, that likely won't work.
I've heard RAM editing is iffy with LGPE because the RAM addresses keep changing..
Hence why sysbots are using SWSH..
First off, your blank save is a SWSH save. If your purposes is for LGPE editing, this mon would not be able to be back converted.
Next, use your mouse and click on the Latest (not OT) Handler area, so that the green box shifts down. (My arrow illustrates how the green box should be below).
Lastly, the reason why you get this legality error is because:
The "current handler" (green box) for this mon is supposedly the OT, and based on information in another tab, it is a Caterpie caught in LGP.
But this Caterpie is in a SWSH save. So logically, the LGP OT cannot be current handler.