In the era of Industry 4.0, advanced manufacturing systems are increasingly integrating cyber and physical components, making them susceptible to sophisticated cyber-attacks. Addressing these vulnerabilities is crucial for maintaining the integrity and efficiency of manufacturing processes. This study introduces a comprehensive game-theoretic model to tackle cybersecurity challenges in such systems. The interaction between cyber attackers and defenders is modeled as a strategic game, incorporating a cost function that includes production losses, recovery from attacks, and maintaining of defense strategies. Both deterministic and probabilistic approaches are employed: linear programming identifies optimal strategies, achieving Nash equilibrium under ideal conditions, while the Quantal Response Equilibrium (QRE) method captures player behavior under uncertainty. The optimization problem is solved using the CPLEX library in Python, ensuring robust and efficient computation of optimal mixed strategies. The methodology is demonstrated through a numerical example, highlighting the identification of potential vulnerabilities and optimal defense strategies. The analysis reveals that the defender's learning curve is longer and more complex than the attacker's, emphasizing the necessity for advanced and adaptive defense strategies. This comprehensive approach not only predicts attacker behavior but also suggests effective defense mechanisms tailored to specific threats. The findings underscore the importance of strategic decision-making in enhancing the cybersecurity resilience of cyber-physical manufacturing systems, offering valuable insights for mitigating cybersecurity risks effectively. The most significant result indicates the critical need for timely and adaptive defense mechanisms to counter sophisticated cyber threats, ensuring the sustained operation and security of modern manufacturing environments.