1.5GHz is a wavelength of 200mm, so a body or path length of several mm won't make much difference.
2512 resistors should be perfectly suitable.
Mind, the transmission line approximation is modified by impedance ratio as well. It's not enough to have a path length of λ/10 or so, but also as the element impedance differs from system impedance, the length needs to be as many times shorter. So, if you have a 50 ohm attenuator with a 300 ohm series element, or 8 ohm parallel element, those elements need to be six times shorter still, or λ/60 say.
But a 6.4mm resistor still isn't far off so I don't think that will be much of a big deal.
You can also consider how to constrain those limits further. What if you use more stages cascaded, to get the same total attenuation? The extreme values required, are less extreme, allowing better performance with larger components.
You can also consider cascading stages of telescopic attenuation, to distribute the power dissipation and therefore enable smaller resistors, say 0805s (1/8W) instead. Downside is, you'll need many more values (BOM items); series or parallel combinations (would allow some optimization) are probably discouraged for bandwidth reasons.
Here's an example with equal dissipation and 50 ohm ports (and, I forget what the output was, -40dB maybe?).
https://www.seventransistorlabs.com/Images/DistAttenuator.png Mind, the extreme-value problem is back, because the first attenuator is like 0.5dB (large shunt, small series values), while the last is like 20dB (large series values). There's probably an intermediate attenuation that gives the least-extreme resistor values, so attenuation stages around that value would give the best compromise between dissipation and part value.
Tim