Attention allows individuals to prioritize and effectively process relevant information while ignoring task-irrelevant distractions. It plays a critical role in task performance, learning and creativity. This study examines how varying levels of workload influence auditory attention, cognitive resource allocation, and the experience of flow. Thirteen participants engaged in a game-based electroencephalographic study designed to induce states of mental underload, overload and flow. To assess available attentional resources, an implicit auditory oddball task was integrated as a secondary task. Spatiotemporal cluster analyses revealed significant differences in event-related potentials when comparing flow and overload to underload. Multivariate pattern analysis successfully decoded all three conditions above chance level, particularly in centroparietal regions. Subjective measures, including the NASA Task Load Index and Flow Short Scale, along with behavioral performance metrics, confirmed the effective induction of flow and distinct levels of workload. Notably, participants demonstrated significantly higher performance and subjectively perceived valence during the flow condition compared to the overload condition, albeit with similar levels of neural engagement. Our results support the notion that experiencing flow may act as a "shielding mechanism," enhancing the effective allocation of attentional resources to the game and improving task engagement and performance efficiency.