I haven't had the chance to read all of this in detail so apologies in advance if I repeat something already stated or otherwise step on anyone's toes.
The reason I mentioned the (non)distinction between sameness and identity is because it is pertinent to the question of mathematical objects. If we begin by thinking of identity as
To have an identity is to be identifiable as a unique and particular individual. — Metaphysician Undercover
We can only investigate identity by looking at the qualities, properties, parts, etc. of an object in order to identify it. The essence of the object, or its form, is never what differentiates it for this purpose. Instead, it is what is accidental to it that allows it to be identified.
Plato, I think, takes identity "all the way" and so sees this process of identification as moving these accidents (which allowed identification) into the essence of the categorically more specific object that is identified. For instance, I see a person, then by perceiving certain accidents of that person (beard, tall, male, etc.) I realize the person is my father. What was accidental to the person (and to fathers in general) is actually essential to the individual that is my father. But if we admit an essence that is my father, he loses his individuality since some other person with the same (identical?) properties would also be my father.
Certain proofs in mathematics hinge on the dissolution of separate identities. For instance, the proofs on
this page about lines tangent to a circle presuppose the existence of points with certain accidents. It is through this method that the contradiction necessary for the proof is shown. This reflexively shows that the points themselves cannot have the accidents which were assigned to them and thus the essence of the points of tangency is grasped. The proof equivalently amounts to showing that these points are the same.
Plato's mistake, it seems, is not noticing that identity only arises insofar as objects are not the same. It is an instrument of abstraction or speculation. Its persistence indicates an indefinite understanding. This implies it is never really present in complete understanding, actuality, truth, etc. Perhaps he was disturbed by the thought that his own philosophy suggested that we do not really have individuality or self-ness. It may have also threatened some of his assumptions about Ethics.
Kant also comments on this in
Critique of Pure reason, Transcendental Doctrine of Method, Chapter I, Section I:
Philosophical cognition is the cognition of reason by means of conceptions; mathematical cognition is cognition by means of the construction of conceptions. The construction of a conception is the presentation à priori of the intuition which corresponds to the conception. For this purpose a non-empirical intuition is requisite, which, as an intuition, is an individual object
(my emphasis)
Kantian intuition therefore must involve this process of construction and dissolution of identity, not as sameness but as arbitrary differences which ultimately prove insubstantial for the concept.
Later, in section 4, he writes
Analytical judgements (affirmative) are therefore those in which the connection of the predicate with the subject is cogitated through identity; those in which this connection is cogitated without identity, are called synthetical judgements.
Kant seems to use Identity to mean sameness, or more specifically that to deduce two things as the same is to show that they share the same identity. This is further supported by
Division I, Endnote 1. So even Kant doesn't really distinguish sameness from identity.
I have more to say but I've run out of brain juice...