That is a problem.
Doing that way will trigger the Google “Kill Switch” or “Factory Reset Protection” and will require your Google account login info in order to setup the phone.
The proper Factory Reset procedure has to be done via the settings in the phone’s OS, as that removes the Google account.
See RW’s page on reset here:
At this point, the only option you can do is give the new owner your account info, so they can setup the phone, then the new owner do a proper Factory Reset via the OS setting (change your password after they complete reset),…or, they return it to you , and you do the reset correctly and then sell it again.
Back in the day, the reset via the “Recovery Menu” was the best way to wipe a phone, however, Google introduced their Kill Switch in to Modern phones a few years ago.
Also, info from Swappa, a popular site to sell phones.