In your league's scoring settings, there is a category titled "Miscellaneous" which is where your commissioner can adjust how many points fumbles and fumbles lost can deduct from a team:
Both of these apply to a player during ANY type of play. This is not limited to just offense.
If I own Saquon Barkley and he fumbles while returning a punt, I would lose 1 point for that. And using the above photo as the scoring, I would lose an additional point if the opposing team recovered the ball.
We don't offer a way to limit fumble deductions to just offense, so if your league would like, the commissioner would manually have to adjust scores any time this happens. Otherwise, leave it as is.