Did you try deleting the intermediate folder inside of your plugin? It might still hold old generated files from the previous version of the engine. Clearing and regenerating it with the newer version might clear up the errors.
You can also change the EngineVersion inside of uplugin if it has it, in newer versions it’s missing all together, so you can try editing it out.