I can not say this for every application. It depends on the default settings of the application.
Photoshop(maybe in XD it is the same) for example:
Also a value you should set is line-spacing: Line Spacing = (Line Height - Font Size) / 2
I hope I could help you at least a little bit.
In general pixel-perfect is hard to do. Font rendering works different on every OS and even sometimes depends on the resolution of the monitor/phone.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.