Where are you based? What year is your bike?
The bolts for the pre-2020 Svartpilen 401’s are M6 x 45mm according to the parts catalogue.
If I were you I’d order some shorter ones. You can surely measure how shorter you need by comparing to the original ones? Then order on eBay. I’d buy stainless blackened ones from a seller called carbolts. I use them a lot.
Either button head or flanged button head ones would work.
I’m based in the UK though, as is that seller.