Protecting solid-state spins from a strongly coupled environment