Russian forces are battling to expel the last Ukrainian soldiers from western Russia after a months-long incursion.