I’ve never encountered this problem before, and I’m not sure if it is related to using iOS 18 beta.
I just tried adding two accounts to my iPhone, and the second addition overwrote the first.
I had this working previously on an older version of iOS, but they have changed the way several of the settings work and the profile section is different.