It ultimately depends on what you are considering to be a "mental illness" really. If you are considering something like autism, it is definitely more on the personality side of it because the autism spectrum can be depicted as a series of personal strengths and weaknesses arranged in a circle (or maybe sphere is more accurate here to account for multiple spectrums in alignment with one another) like a colour wheel, including learning speed, ability to focus, fine motor skills, inherent ability to pick up on social cues etc. If you are talking about something like depression, then that is much further towards the illness end of the personality-illness spectrum because it is both a temporary thing which is much easier to combat with medication and therapy.
I don't think you can really view something like this in a black-and-white manner; just like most things, it is more accurate to picture it as a spectrum rather than a Venn diagram, with certain things sitting further towards one end than others. "Mental illness" is a term which gets stapled onto so many things due to a combination of ordinary reasons and societal reasons that it is just way too broad to classify something in as clear-cut a manner as "personality," "illness" or "both," especially when society and certain medical circles have a history of plugging it onto more things than just the classic set of autism, depression, PTSD, schizophrenia, psychosis etc. but also onto other, more subjective things like psychopathy, sociopathy, pedophilia, gender dysphoria etc.; hell, homosexuality not being considered a mental illness in the eyes of the law is still a relatively recent development, with people in the UK who wanted to avoid imprisonment being forced to undergo hormone therapy for it until as late as 1967 (England and Wales), 1980 (Scotland), or 1982 (Northern Ireland).
I agree with the sentiment shared by a few people in this thread in that something should only be considered an illness when it negatively affects your day-to-day functionality in a direct manner. This means that depression, PTSD, schizophrenia, and psychosis are all clear-cut mental illnesses, meanwhile the distress element of gender dysphoria (i.e. not the social element that comes as a result of this distress) is a factor which means that medical circles (e.g.
the NHS) typically classify it as an illness/condition. As for the rest, either they are not mental illnesses or, in the case of autism, whether they are viewed as one depends on both the type and severity of what the person has. However, something to also consider is that a lot of these things, such as psychopathy, do have neurological roots which mean they can also be considered mental illnesses. (Speaking of which, I've found a
good blog post about this aspect of psychopathy.)
Faint also brings up an excellent point; you are shaped by your experiences, so whether or not something is considered a "mental illness" as opposed to pure personality it is going to have knock-on effects which do, in turn, cause them to shape your personality. Personalities are multi-layered and evolving, and it is important to just take these things in your stride rather than dwelling on them, and like Faint said you should take the necessary steps to combat any issues that may be caused by your condition.