I was taught in school that accelerations of both the ends along the string is same if the string is not slacked a.k.a the string constraint.
A lot of good answers already, but I will start by discussing what context you heard this in.
This was probably told to you in the scenario of two objects connected by a string, and then you pull horizontally on one object to pull the entire system. In this case you are right. If the string is not slacked, then the accelerations of each end of the string must be the same. At this point the string acts like a massless rigid body. Since the whole system will have a single acceleration, it must be that all points (not just the ends) of the string have the same acceleration. If this were not the case, then the string would either be stretching at some points, or folding in on itself at some points.
Now, in the case of the rotating object attached to a string, you actually have a bigger "issue" than you realize. Technically all points along the string have a different acceleration! This is because, assuming a constant angular velocity $\omega=v/r$,
So if the heart of your question is asking why the "string constraint" doesn't apply here, you should be looking at all points along the string. Not just the end in the center.
The reason this occurs is because as you move closer to the center of the circle, the linear velocity becomes smaller and smaller. Since acceleration is change in velocity, this means that the acceleration will also become smaller. At the center of the circle, the velocity is constant ($0$), so the acceleration must be $0$ as well.
So the resolution to your question really is just that the "string constraint" is not a true constraint in this system (unless you find a way to reword it to be more general). What you learned in school was probably just said in the context of a particular problem, and was not meant to be a generalization to how strings behave in all contexts.