I have realized that this can be an indication of wrong geotagging. When I look at the pictures on the last flight line, the first of them does not belong there, but to the previous flight line. The other pictures seem to have the correct geotagging, but the image count on the last flight line is ahead by one. Once the end of the flight line is reached, the last picture is taken by the drone, but ignored in the .p4d file.
I am not sure what the cause is. Maybe bad wifi signal, but I was flying in open space. Maybe the wind was too strong, thus delaying the drone manoeuvres and causing a mismatch between timings and positions.
Only solution I see is to fly again, with extra space at the end of each flight line, so as to be able to discard mishaps.
Any suggestions appreciated. Thanks.