Parkinson's disease (PD) poses a growing challenge due to its increasing prevalence, complex pathology, and functional ramifications. Electroencephalography (EEG), when integrated with artificial intelligence (AI), holds promise for monitoring disease progression, identifying sub-phenotypes, and personalizing treatment strategies. However, the effect of medication state on AI model learning and generalization remains poorly understood, potentially limiting EEG-based AI models clinical applicability. This study evaluates how medication state influences the training and generalization of EEG-based AI models. Paired EEG recordings were utilized from individuals with PD in both ON- and OFF-medication states. AI models were trained on recordings from each state separately and evaluated on independent test sets representing both ON- and OFF-medication conditions. Model performance was assessed using multiple metrics, with accuracy (ACC) as the primary outcome. Statistical significance was assessed via permutation testing (p-values<0.05). Our results reveal that models trained on OFF-medication data exhibited consistent but suboptimal performance across both medication states (ACC_OFF-ON=55.3\pm8.8 and ACC_OFF-OFF=56.2\pm8.7). In contrast, models trained on ON-medication data demonstrated significantly higher performance on ON-medication recordings (ACC_ON-ON=80.7\pm7.1) but significantly reduced generalization to OFF-medication data (ACC_ON-OFF=76.0\pm7.2). Notably, models trained on ON-medication data consistently outperformed those trained on OFF-medication data within their respective states (ACC_ON-ON=80.7\pm7.1 and ACC_OFF-OFF=56.2\pm8.7). Our findings suggest that medication state significantly influences the patterns learned by AI models. Addressing this challenge is essential to enhance the robustness and clinical utility of AI models for PD characterization and management.