MySQL auto Increment id has taken but seems like not written to disk
Please provide the schemas involved, plus the SQL statements.

A wild guess is that you are using OFFSET (or LIMIT nnn,mmm).  I explain here why OFFSET can skip or duplicate rows.