• You only show the trigger-code, but there is more code involved.

    In your opening-post you mentioned that you can insert multiple rows at once.

    How is that INSERT-part coded?

    But I can tell you this from looking at the trigger-code: Your trigger will only work correctly - and as expected - when you insert only one row!

    "Walking on water and developing software from a specification are easy if both are frozen." -- Edward V. Berard, "Life-Cycle Approaches"