You complicate the topic of mass very much. If we assume that the mass and volume of elementary particles depend only on the size, then everything becomes simple. (If you forget about the stupid Compton wavelength). The simplest explanation of the essence of elementary particles - They all consist of some one matter with the same density (i.e., filling the volume with mass), which allows them to turn into each other in cosmology, is an axiom that gravity (the generation of mass) bends space. Let's look at this question in a different way - the Volume of mass bends space, and gravity-the appearance of forces acting on a material body located on the "slope" of the funnel of space distortion.
By the way, the inertial mass essentially has the same nature - if the body is trying to "push" out of the funnel of its own gravitational distortion, it will try to roll back along its slope. And if space distortion is an established fact for planets, stars, and black holes, why is it denied to nuclei and elementary particles ?
Compare the beginning of the table of elementary particles and the list of Plato's bodies-regular polyhedra. Proper rotations of a 3-dimensional space are exhausted by a list of Cn,Dn,C,and O. Y. the First two are sporadic groups, and the last three are groups of Plato bodies. And here you can consider this option: a photon is a tetrahedron (dual to itself) and an antiparticle to itself. Electron-cube, electron-neutrino-octahedron. The mu-meson is a dodecahedron, and the mu-neutrino is an icosahedron.
The last two pairs are connected by duality, common symmetry (lepton charge), and polyhedra with a triangle face move at the speed of light. And if the volume of a cube (electron) with edge a=1 is V=1, then the volume of a dodecahedron with edge =3 is V=206.9. Almost exact hit to the Muon mass. The error is about 0.06%.
When forced high motion of an elementary particle, it does not shrink, but rather "smears" across space along the trajectory of movement. This gives a total volume in discrete time greater than that of the particle at rest. This is what is called relativistic mass increase. The constancy of the speed of light is a consequence, first of all, of the discreteness of continuous space (this is no worse than the wave-particle duality) and of the constant transmission of the excited space as a particle with triangular faces to the neighboring discrete space.
Breaking away from the electron (and carrying away part of its mass smeared in an orbit around the nucleus), the photon obeys only the space through which it propagates. If on the way there is a substance (consisting of atoms) that the photon does not have a straight path, but in places moves along the slopes of gravitational pits formed by the masses of atomic nuclei. Naturally, this path will be longer and we will notice a decrease in the speed of light in the substance. After leaving the substance, the photon again moves in a straight line, restoring the speed of light.
And diffraction with interference-phenomena obtained by the passage of a photon near the edges of matter, falling in places into gravitational pits that bend its path and give a spread of further trajectories and their directions.
A photo well from a distant star does not matter in which inertial system the object is considered to fall into. If stationary, then directly into it, and if moving, then into some part of it "smeared" along the trajectory.