I have it as the same error code on my records.
P0521 Engine Oil Pressure (EOP) - Sensor Performance ECM DTC P0521, P0522, or P0523,
Since you have replaced the EOP, Maybe check the connector plug, and trace to back to the ECM, and check its continuity, and resistance from point to point.
Circuit/System Testing
1. Ignition OFF, disconnect the harness connector at the engine oil pressure (EOP) sensor.
2. Ignition OFF, test for less than 1 ohm between the low reference circuit terminal 1 and
ground.
3. Ignition ON, test for 4.8-5.2 volts between the 5-volt reference circuit terminal 2 and ground.
4. Verify the scan tool Engine Oil Pressure Sensor parameter is less than 0.2 volt.
5. Install a 3A fused jumper wire between the signal circuit terminal 3 and the 5-volt reference
circuit terminal 2. Verify the scan tool Engine Oil Pressure Sensor parameter is greater than
4.8 volts.
6. If all circuits test normal, test or replace the EOP sensor.
Repair Instructions
Perform the Diagnostic Repair Verification after completing the diagnostic procedure.
• Circuit Testing
• Connector Repairs
• Testing for Intermittent Conditions and Poor Connections
• Wiring Repairs
If greater than the specified range, test the circuit for an open/high resistance. If the
circuit tests normal, replace the ECM.
If less than the specified range, test the 5-volt reference circuit for a short to ground or an
open/high resistance. If the circuit tests normal, replace the ECM.
If greater than the specified range, test the 5-volt reference circuit for a short to voltage.
If the circuit tests normal, replace the ECM.
If greater than the specified range, test the signal circuit terminal 3 for a short to voltage.
If the circuit tests normal, replace the ECM.
If less than the specified range, test the signal circuit for a short to ground or an
open/high resistance. If the circuit tests normal, replace the ECM.
• Engine Oil Pressure Sensor and/or Switch Replacement for 4.8L, 5.3L, 6.0L, 6.2L, or 7.0L
engines
• Engine Oil Pressure Sensor and/or Switch Replacement for 3.6L engine
• Control Module References for ECM replacement, setup and programming
hope this helps.