If you have tried the steps above and the 2021 version of x360ce still throws Error Code 4, consider these alternatives:
With the shields finally up and the error gone, Alex's generic controller was finally recognized as an Xbox 360 pad. The marathon was back on. How to Fix Self Protection Failed Error Code 4 - AI Bud self protection failed error code 4 x360ce 2021
Missing or damaged DLL files, specifically xinput1_3.dll . If you have tried the steps above and
Search for configuration configuration logs like OnlineFix.ini or x360ce.ini and delete them. self protection failed error code 4 x360ce 2021
Understanding and Resolving "Self Protection Failed: Error Code 4"