Like other commenters have said, start by asking the upstream developer (whether that's by sending a message with a link to the fork or by sending a mega-PR that says you don't expect it to be merged as-is in the description). They should be the best judge of how they'd prefer to handle it. The thing I'd add is that you should try to avoid taking it personally if their preferred approach isn't one you think is a good idea. Sometimes good fixes end up never merged because of disagreements becoming too heated even if everyone's basically on the same page about the fox being good. There's also a decent chance that your refactors are things the upstream developer explicitly doesn't want and would otherwise have done them themselves and implemented the same fix, too, or they don't agree that your fix is good enough. They won't want to be on the hook for maintaining contributions that use approaches and code style that they don't like, and that's okay. They also might know something you don't about their project that would make something that's obviously a good idea to you obviously a bad idea to them.
Basically, just try and remember that if it's a hobby project, it makes progress when the maintainer is having a good time, and gets abandoned when they're not anymore, so try and avoid making a mess and having arguments when they're the one that'll have to deal with any fallout from any mistakes.