My partner is now a vegetarian, and one food I miss cooking for dinner together is spaghetti carbonara. What would a good substitute for the pancetta/bacon be? The role of the pork is not just the flavor, but the hot liquid fat also emulsifies the rest of the dish and cooks the egg. So a different approach would need to fill both roles of the pork.
Do not look for all these functions in one off-the-shelf ingredient.
For the smoky taste and bacon texture, try various brands (there are differences in taste and texture) and cuts (as in, HOW you cut it) of smoked tofu. Dulse seaweed is also often recommended as a bacon substitute (but can taste too fishy).
Where hot saturated fat is needed, you will need to add that separately at the right time - or separately fry the abovementioned ingredients with excess butter/oil (getting some smoky flavor infusion) and add them with (or before) that excess oil. Butter or ghee/clarified butter (probably preferrable due to heat tolerance) are chemically closer (mostly saturated fat) to bacon fat than an oil.
Vegetarian bacon does exist. It's thinly sliced tofu, soy sauce and liquid smoke. I'm not a big fan of liquid smoke, so I'd probably just use a little smoked paprika. Or you could just buy it from your grocer if they carry it.
To get the crisp, give it a light dusting of cooking spray (canola oil, usually) before putting it in the pan to fry.
For the fat, I agree with rackandboneman that clarified butter is your best bet. But you also don't want to make something too hollandaise-y with that egg and butter, so you might want to add a touch of heavy cream as you finish with the egg.