Network dismantling deals with the removal of nodes or edges to disrupt the largest connected component of a network. In this work we introduce CoreGDM, a trainable algorithm for network dismantling via node-removal. The approach is based on Geometric Deep Learning and that merges the Graph Dismantling Machine (GDM) framework with the CoreHD algorithm, by attacking the 2-core of the network using a learnable score function in place of the degree-based one. Extensive experiments on fifteen real-world networks show that CoreGDM outperforms the original GDM formulation and the other state-of-the-art algorithms, while also being more computationally efficient.