Autonomous network management is crucial for Fifth Generation (5G) and Beyond 5G (B5G) networks, where constant environmental changes must be predicted, adapting network configurations accordingly. Model-ing tools are required to predict the impact on performance when new traffic combinations and routings are applied in the network. Mathematical analysis and network simulators are techniques to model modern networks but have limitations of low accuracy or high execution times, respectively. To overcome these limitations, Machine Learning (ML) algorithms, and more concretely, Graph Neural Networks (GNNs), are proposed to model modern networks due to their ability to capture complex relationships from graph-like data while predicting network properties with high accuracy. However, one of the main issues when using GNNs is that they cannot generalize to larger networks, when different input data (i.e. smaller network topologies, and shorter paths) are provided for training and predictions (e.g., larger network topolo-gies, larger paths). This paper addresses the GNN generalization problem by leveraging networking concepts and analysis to improve a base-line model. The results applied on the RouteNet baseline developed by Barcelona Neural Networking Center-Universitat Politècnica de Catalunya (BNN-UPC) significantly improve the model’s accuracy in larger graphs. In addition, we propose a closed-loop control context where the resulting GNN model could be potentially used in different use cases.