DS1307 12 hours mode
It looks like your hours register values of 0x52->0x41 are correct but for transitioning from 12.xxAM to 1.xxAM.

The register 0x02 layout is:


   3:0  Hours low digit
    4   12hr: 0=AM, 1=PM   24hr: 10's digit
    5   10's digit
    6   Mode: 0=24hr; 1=12hr
    7   Always 0


Breaking down your values...

0x52 is 0101 0010 and means "12 hr mode, 10+2 o'clock AM".

0x41 is 0100 0001 and means "12 hr mode, 1 o'clock AM".

So it looks like the fault is in your AM-PM rollover test program.

You're actually testing for 12.59AM->1.00AM, not the 11.59AM->12.00PM you think you're trying.