I would prefer a much lower ESR or D.F. than a random metal film cap. So choose PP type film rather than PE.
Not all are the same. Since it is near the large coil for likely a Class D/E Bass Amp, the cap is used to filter switching square waves going to bass speaker that are PWM modulated, so there will be high ripple currents. These parts have a PTC effect in the conductors like any metal so as they get warm, the resistance rises with thermal runaway.
It is much bigger, but I think you can squeeze it in with heatshrink on exposed leads and is worth the cost.

This one is non-inductive low D.F.. Others like your Vishay/Kemet are 1% DF @ 1kHz and n/a at 10kHz and made of Polyester (PE)
Panasonic type Polypropylene (PP) is better also rated at high voltage ( no matter) but bigger.
https://www.digikey.com/en/products/detail/panasonic-electronic-components/ECW-F4274HL/656351
https://industrial.panasonic.com/cdbs/www-data/pdf/RDI0000/ABD0000C245.pdf
0.27 uF @ 400V
0.2% loss at 10 kHz
0.05% loss at 1 kHz
$1.87 (1) also more expensive each but less overall.
Plastic Film Capacitors
Non-inductive construction using metallized polypropylene
film with flame retardant epoxy resin coating
Perhaps equivalent, but 6x hotter at 10 kHz
A PE example from Kemet as follows is similar to what you found
https://content.kemet.com/datasheets/KEM_F3065_F611_F612.pdf
