If the measurement only includes the cooler and not the I/O bracket then it definitely won't fit.
The "PCI Express Card Electromechanical Specification" has a section describing "Add-in Card Form Factors". One of the form factors is called "Full Length" and measures 312 mm without the I/O bracket (and 325.33 mm with the I/O bracket). The classic Mac Pro, 2019 Mac Pro, and the Sonnet Echo Express III-D are example enclosures that use that length and have guides at the end of the slot that a card slides in which holds the card more securly (no side-to-side motion at the end of the card). The guide the card slides into can be up to 5 mm deep, since the spec says no components can exist in the final 5.08 mm of the card.
Do any PC desktops have those guides? I don't know. My PC desktop case does not.
Do any PCIe cards exceed this length? I guess the PowerColor Red Dragon Vega 56 does might.
Here is a picture of a full length card and the guides in the Sonnet Echo Express III-D.
View attachment 889669
There's a video showing removal of full length GPU from Mac Pro 2010. It shows the guides of the Mac Pro that hold the full length card.
The spec also describes a "Retainer" which seems to add 26.96 mm to the 312 mm length and adds an offset of 14.27 mm in the component side direction of the card. I don't think I've ever seen that before. Such retainers, if they exist, are optional and can be removed to allow the card to fit in something like the classic Mac Pro, 2019 Mac Pro, and the Sonnet Echo Express III-D.
That 313 mm must be including the 13.33 mm of the I/O bracket or something.