The re-INVITE is a new transaction on an existing dialog
Kamailio acts as a proxy
so in general it doesn't care about the dialog state ( even if you involve the dialog module - it still doesn't care )
Mostly re-INVITE should contain all information to how to reach the endpoint ( in Route headers) ( if topology hiding isn't involved, but if it is involved then the server knows about the dialog anyway )
So, if you receive a re-INVITE with Route set where your proxy is involved - you may consider this request belongs existing dialog and avoid authentication as it contains to and from tags, as well as the same Call-ID, which fully describes a particular session, into which your proxy is involved.
Even according
https://www.rfc-editor.org/rfc/rfc3261.html#section-12.2 re-INVITEs MAY contain Record-Route headers, it would not affect the initial Routes set.