How to wait the finish of the bpy.ops.render.render('INVOKE_DEFAULT',animation=False, write_still=True)?
Blender's API documentation shows how to use the application handlers. In order to execute a function after rendering is complete, you can use one of the following two handlers: 


bpy.app.handlers.render_post - Executed once after each rendered frame
bpy.app.handlers.render_complete - Executed once after all frames have been rendered


The function you want to execute is appended to the list of handler functions through append(some_function), where some_function is a reference to a function. It needs to take one argument, because an object of bpy.types.Scene will be passed to the function. Example:

def some_function(dummy):
    print("some function")

bpy.app.handlers.render_post.append(some_function)


If you later want to remove the function from the list of handlers, simply use remove(some_function). Example:

bpy.app.handlers.render_post.remove(some_function)




import bpy

def some_function(dummy):
    print("some function")

def some_other_function(dummy):
    print("some other function")

# Will be executed once after each rendered frame
bpy.app.handlers.render_post.append(some_function)

# Will be executed once when the whole rendering process is completed
bpy.app.handlers.render_complete.append(some_other_function)

bpy.ops.render.render('INVOKE_DEFAULT', write_still = True)