Do I need to replace this tire or is it safe to drive it this way.
I would replace that tire, can't see how deep it goes, but it looks deep from the angle shown.
If there is unseen damage to the plies or carcass then it could fail going into a bend or at high speed, neither is good...
That tire is toast. A hole or cut anywhere from the outermost tread block to the rim of the wheel is fatal, even if it doesn't go all the way through the rubber.