This is interesting. If hair is falling out then it would be a good idea that you go and consult your GP as this may be an indication of an underlying health problem. Hair loss can be the result of pregnancy, hormone disorders, under/over active thyroid and other issues.
Modern hair colourants shouldn't cause hair loss but if you are worried about it you should investigate whether there is an option to use a gentler colour line. Many manufacturers produce permanent dyes now without the use of ammonia for example L'Oreal INOA, Schwarzkopf Senea or Essensity.