Bitcoin Core by default only keeps your transaction in its mempool for 336 hours (14 days) before kicking it out:
-mempoolexpiry=<n>
Do not keep transactions in the mempool longer than <n> hours (default:
336)
But I'm sure you already knew that.
I knew that, but I meant a transaction made by my own wallet in Bitcoin Core. Did that change? I remember (years ago) I had an unconfirmed zero-fee transaction for months, until I double spent it. I don't think it ever stopped broadcasting it.