Mass loss and expansion of ultra compact dwarf galaxies through gas expulsion and stellar evolution for top-heavy stellar initial mass function uri icon