From what I’ve learned, there is a difference when used as an actual apology.
“I’m sorry” (on its own, without being followed by “you feel that way”) is genuine and tells that the speaker is honestly so.
“I apologize” is formal and kind of fake. They’re likely more sorry they were called out rather than sorry for what they were called out for.
Yeah, that’s my take. “I’m sorry” is about how you feel. It’s like the OP post: you’re expressing sympathy, or remorse - an emotion. If it’s because of something you did, it does double duty as an apology. “I apologize” gives no indication that you’re sorry about what you did, or concede that it was wrong. It’s merely a recognition that harm was done, and giving a concession to the other person to achieve harmony.