Evolution of giant planets with dilute cores in MESA