Hi Eslam,
The losses are a partial explanation.
The other factor that would affect the NPV when you switch between turning "Battery can charge from grid" on and off on the Battery Dispatch page is the dispatch option, electricity rate structure, and load.
You can investigate this by exploring the outputs in the Data Tables tab of the Results page. Under "Monthly Data," outputs like Energy to battery from grid/system, Energy charge with system, and Demand charge will system will show how the charge-from-grid option affects the monthly electricity bill, which in turn determines the value of electricity generated by the system for the NPV calculation.
Best regards,
Paul.