Differential protection stands out as the optimal choice for protecting AC microgrids, compared to overcurrent and distance-based schemes, because of its adaptability to different network topologies, ability to manage bi-directional power flow, and better selectivity for system transients and variable fault current. However, high impedance faults, time synchronization error, and high bandwidth communication requirements are significant challenges faced by differential protection schemes. Considering such issues, this paper has proposed a novel differential protection scheme based on loss function (Percentage Bias Error), evaluated by using line's both end superimposed positive and negative sequential currents magnitude, which enhances the sensitivity in identifying internal fault that occurs in either grid-connected or islanded microgrid mode of operation. Its effectiveness is validated on ring and radial distribution networks with high impedance fault (500 Ω) at different fault locations. Additionally, the relaying scheme is stable under different system transients, CT error in noisy environments, and robust for time synchronization error. Moreover, the proposed scheme is compared with the existing techniques to illustrate its high sensitivity, fast operation (within one cycle), and high accuracy. The proposed scheme is simulated in a MATLAB Simulink environment, and results are validated using a laboratory-level hardware setup.