Network Digital Twins (NDTs) function as virtual replicas of real networks, enabling real-time monitoring and analysis of 5G core networks. Graph Neural Networks (GNNs) have emerged as a promising approach for node failure classification within NDTs. However, the issue of graph imbalance which adversely affects GNN performance, particularly for minority classes has received limited attention in existing research. Information propagation among nodes can amplify majority class dominance, resulting in reduced classification accuracy. To address this challenge, we propose a Graph Fourier Transform with a Cost-Sensitive Message-Passing Neural Network (GFT-COSMEP) for imbalanced node classification. This approach first applies the Graph Fourier Transform (GFT) to generate node embeddings, followed by message aggregation on a sampled graph to enrich node representations. A cost-sensitive learner then leverages these embeddings to improve imbalanced learning performance. Sensitivity analysis confirms that tuning the model's cost-sensitive parameters enhances accuracy, achieving optimal results at a specific balance of loss terms. Experiments on real-world 5G network and NDT-based failure classification datasets demonstrate that GFT-COSMEP outperforms existing methods, achieving up to a 21.1% accuracy improvement at a 0.3 imbalance rate. These results highlight GFT-COSMEP's effectiveness in managing class imbalances in graph-based data.