The short answer is yes, it is safe to drive with a bad camshaft sensor, but it’s not good for your engine long-term. You’ll likely see a higher fuel consumption and poorer engine performance the longer you wait to get it fixed.
The camshaft sensor regulates how much fuel enters the combustion chambers, ignition timing, and emissions, so without that information, your engine might struggle.