The article is missing a description on how to achieve the same functionality with an on premises SharePoint 2019 that uses Azure Active Directory for authentication. The AadHttpClient is not available in the SPFx version for SharePoint 2019 and there seems to be no reliable way as an SPFx web part to authenticate against Azure AD without prompting the users for credentials.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Thanks for the comment. If you look closely at the documentation you linked, there is a section in purple that has a description on how to achieve the similar functionality.
The documentation specifies what you can do if you are using a version of SPFx earlier than 1.4.1 (shipped with AadHttpClient).

@bcameron1231 Unfortunately, that is not a real solution, as it does not offer the same functionality as the AadHttpClient and has severe drawbacks (additional pop-ups, registration of additional redirect URLs, etc.).
@lafe Understand you feel that way. It is a real solution, unfortunately it's just not an ideal solution... one of the side effects of working in older versions of a framework.
There have been techniques used in the Adaljs library for silent authentication using a hidden Iframe, I suggest taking a look and seeing if you can implement that.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues