Bastianini broke a shoulder blade after VR46 Ducati rider Luca Marini collided with him in the Portuguese GP sprint race.
The four-time race winner didn’t require surgery on the injury, but was ordered to rest to allow his shoulder to heal. That forced him out of the Argentina GP, while he was deemed unfit to race at the Americas GP in April.
Bastianini was cleared to return for the Spanish GP last weekend, but could only complete one day of riding.
Having been in significant pain during Friday practice at Jerez, Bastianini only completed a handful of laps in Saturday’s FP3 before electing to withdraw from the remainder of the round.
With three weeks splitting the next round in France next weekend and the Italian GP, Bastianini will sit out the Le Mans round to be ready for his and Ducati’s home event.
Bastianini’s continued absence means he has still only completed one full racing lap as a factory Ducati rider.
He will be replaced at Le Mans by ex-Ducati MotoGP rider Petrucci.
The 32-year-old raced in MotoGP between 2012 and the end of 2021, joining Ducati with Pramac in 2015.
The Italian was promoted to the factory Ducati squad in 2019 to replace triple MotoGP champion Jorge Lorenzo, and scored his first grand prix victory at the Italian GP that year.
Petrucci won for a second time at a wet French GP in 2020 before moving to KTM with Tech3.
A difficult season led to Petrucci being deemed surplus to requirements by KTM, with the Italian embarking on a Dakar Rally campaign with the Austrian brand.
Insight: Inside Petrucci's Dakar odyssey
Petrucci made history by becoming the first rider in history to win a MotoGP race and a stage on the Dakar.
A full rally raid campaign with KTM was meant to follow Dakar but never materialised, with Petrucci moving to the United States to race in the MotoAmerica Superbike Championship with Ducati.
Finishing runner-up in the standings, Petrucci earned a move to World Superbikes with Ducati and Barni Racing. He currently sits eighth in the standings having scored a best result of fifth at the Indonesian round.
Petrucci made a one-off MotoGP appearance last season with Suzuki in Thailand as Joan Mir’s injury replacement, finishing the race 20th.