Virtual particles themselves can always be ignored as they are not physical. They're purely a computational method in some approaches. They don't exist in others at all. And even when they are part of the method what kind they are depends. Looking at momentum space? Your virtual particles can have any position. Looking at position? Your virtual particles can have any momentum.
Alternatively: Virtual particle just means that if you have a certain kind of field, what kind of "particles" you need to sum up to get that kind of field. The field itself is the physical thing. Viewing it mathematically as sum of virtual particles is just a mathematical viewpoint.
It's not exactly informative nor true. Yes you can describe the electric field as sum of virtual photons but that's different to a normal photon. And even then the electric field is not the same as the potential energy. Sure it defines it but it's not the same as the potential energy of the charged object.
In case of protons it's the same. It's better to think of it as a field, which it is. Gluon in itself is "just" an excitation of that field. Just like photon is an excitation of the electric field. And the binding energy of the proton comes from the quarks interacting with the gluon field.
The reason I'm talking so much against the virtual particle viewpoint because then people will start thinking of some things whizzing about. That's not what happens. It's a field.
It's actually better to think of even the normal fermions with mass with fields, because that's what they are. It's no longer surprising that how does electron go through both slits at the same time or how all electrons are identical. Of course they are identical as there is just one electron field that has a very specific kind of excitation that propagates.
This is not some random "Look at my weird theory". It's what Quantum Field Theories are. I mostly blame bad science journalism looking at Feynman diagrams (a great mathematical tool, don't get me wrong) that has people thinking too much about virtual particles.
To think of a proton as containing tons of gluons would be a mistake.
Additionally gluons are expected to be massless, they basically come into existence as needed.
Sure you can describe the electric field in that case by a viewpoint where you sum virtual photons together to get said electric field. Whereas a non virtual photon is alltogether a different thing. You can actually describe a normal non virtual photon as a sum of virtual photons.
Point is that virtual particles are just a mathematical tool.
Actual real gluons do exist and they're analogous to the actual photon.
In case of electromagnetism the actual stuff is the electric field. With proton (so in quantum chromodynamics) it's the gluon field. It's called that because every particle has a field and every field a particle. It would be kinda like calling electric field a photon field. Same difference.
In a charged capacitor, there's a lot of electrons on one side, but very few of them on the other. When you close the capacitor, suddenly you get a lot of energy out of it.
https://profmattstrassler.com/articles-and-posts/particle-ph...
There is a very good video of a lecture by Leonard Susskind that explains why energy and mass are interchangeable in this way if you want a more in-depth explanation:
The famous thought-experiment in the regard is Einstein's "photons-box": If you could confine a bunch of massless photons (which only have kinetic energy and momentum) inside a (massless) box made out of mirrors, (he argues) the combined package would have "mass", even though the constituents do not (and the emergent "mass" equals E=m c^2 !). In other words, "mass" is an emergent property of the confined ensemble. All of the forces (especially the strong force), create bound-states which are massive and are the exact analogues of this "photon-box".
So the mass of a proton (mostly) comes from the kinetic energy of its confined (by the strong force) constituents (the quarks and gluons).