Dynamic phase transition in the Heisenberg model under a time-dependent oscillating field