use gdal/ogr to georeference your output rasters using the metadata from the input rasters.
from osgeo import gdal, ogr
src_tif = gdal.Open('input.tif')
new_tif = gdal.Open('output.tif')
ulx, xres, xskew, uly, yskew, yres = src_tif.GetGeoTransform()
lrx = ulx + (src_tif.RasterXSize * xres)
lry = uly + (src_tif.RasterYSize * yres)
gdal.Translate('georeferenced_input.tif', new_tif, outputBounds=[ulx,uly,lrx,lry])