Quantum resources outperform classical ones for certain communication and computational tasks. Remarkably, in some cases, the quantum advantage cannot be improved using hypothetical postquantum resources. A class of tasks with this property can be singled out using graph theory. Here we report the experimental observation of an impossible-to-beat quantum advantage on a four-dimensional quantum system defined by the polarization and orbital angular momentum of a single photon. The results show pristine evidence of the quantum advantage and are compatible with the maximum advantage allowed using postquantum resources.