REGR: fix df.apply with keyword non-zero axis
Fixes #48656. Builds on top of #48693.

An alternative fix could be to use `inspect.signature`, since `inspect.signature` defaults to following wrapped functions. But this seems like a more minimal change.

- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
cc @MarcoGorelli  Thanks, made the changes Addressed all of @MarcoGorelli's comments.

As I said in the PR body, I chose not to use inspect.signature because it's often good to try and keep regression fixes minimal. But I'm happy to change it, so let me know and I will :-) Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
git checkout 1.5.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 1dee9344a4e9a3a00935d3b91587254b5fb0b4f0
```

3. You will likely have some merge/cherry-pick conflict here, fix them and commit:

```
git commit -am 'Backport PR #48797: REGR: fix df.apply with keyword non-zero axis'
```

4. Push to a named branch:

```
git push YOURFORK 1.5.x:auto-backport-of-pr-48797-on-1.5.x
```

5. Create a PR against branch 1.5.x, I would have named this PR:

> "Backport PR #48797 on branch 1.5.x (REGR: fix df.apply with keyword non-zero axis)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
                 thx @hauntsaninja 