In the modern era, managing optimal real-time control of microgrids during the operation phase has been a significant challenge, requiring careful consideration of both technical and economic factors. This paper introduces a framework for the real-time control of islanded microgrids using a preserving network. This structure incorporates various distributed generation sources, including rotating and non-rotating resources, along with energy storage systems. The optimization function within model predictive control (MPC) manages essential network parameters, such as frequency and voltage, while addressing real-time economic and technical objectives. To enhance precision and account for uncertainties in generation and consumption parameters, the integration of continuous power flow and the preserving network model is employed. This approach aims to create a model that closely mirrors real-world conditions, ensuring a more accurate representation of microgrid dynamics. The proposed structure demonstrates significant improvements in both technical and economic performance compared to Standard MPC and Adaptive MPC, highlighting its potential for more efficient islanded microgrid management. The proposed framework achieves notable reductions in total voltage deviation of 85.87% and 87.62% compared to Standard MPC and Adaptive MPC, respectively. Additionally, it delivers impressive enhancements in frequency deviation of 99.46% and 96.62% compared to Standard MPC and Adaptive MPC, respectively. Economically, the proposed framework significantly outperforms both, reducing costs by 39.29% compared to Standard MPC and by 28.12% compared to Adaptive MPC.