It could do this for many reason which requires an OE diagnostic computer, but I'd start by checking the battery with a good battery tester.
This would be the first and cheapest test.
Zee
RepairPal Certified shops can diagnose and repair your 1999 Porsche 911. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.