It seems that in the documentation of xlwings, it is necessary to have an empty row and column at the bottom and to the right. if not it will overwrite it
http://docs.xlwings.org/en/stable/api.html#xlwings.xlwings.ret
solved xlwings udf function erase next cell on excel