Unfortunately tuning chips cannot 100% guarantee against the 504 error.
In order to clear the error, you must ride for approximately 60 mins with the bike turned on but assistance off, the error will clear from your display during the ride. You can also try this drill hack if you have the correct tools at home.
Once you've cleared there error it's worth checking what drive unit software you have, many 504 errors are caused due to old software. One particular version from 2020 (126.96.36.199) is known to cause the error with and without a tuning chip fitted. It's highly recommended to update from this version to 1.1.0 onwards.
To check the software version on a purion display;
With the display turned off, press and hold PLUS + MINUS and tap the ON button
The software version will appear under DU (Drive Unit)
To check the software version on a Kiox, simply go to component settings