This is because you are trying to store the image in the record using the insert record server behavior, since the insert record server behavior happens first, the image has not been uploaded yet to set the server file name.
In actual fact, since the image is being given record ID as the name, there is no reason to store the file name in the database. you can refer to the ID column of the database to get the images name.