This is a problem of relativity. Your experience is not the same as theirs. Your opinion on an acceptable work/life balance and the compensation to justify it is not the same as theirs.
I don't know German wages well enough to comment on the objective numbers. Though I am in a neighboring country, and €40k for a junior developer position is quite an impressive paycheck.
I know several fresh junior developers who work for around €25k or less a year, and that is including on-site work and commuting. For reference, the cost of living here is over all even higher than it is in Germany.
Ignoring the specific salaries, since I don't have perfect knowledge on Germany's salaries to confirm my suspicions of you having an above average wage already, there are several things you need to consider based on the interactions you've had with the employer, regardless of the specific numbers involved.
1. The company may simply have a capped budget.
They wouldn't want to admit that cap, so they're more likely to just argue that the amount offered is the correct amount.
It also doesn't make sense for them to show that there is a cap. If an interviewee doesn't like the amount, they'll leave anyway. The only interviewees who stick around are the ones the company has a shot of hiring.
2. What makes you stand out?
You describe yourself as a junior python dev who works by themselves (coding-wise). But how many of those are walking around? Because if there are many other applicants, the company has no reason to pick the one guy who's asking for more than the others are.
The company is always going to hire the person who fits the bill who asks for the lowest wage. That's just pure logic. So to get a job, you have to make sure that you either ask for the lowest wage or make sure you are the best (and relatively unique) fit for the job.
If you're a dime a dozen, you have to lower your wage expectations. If you want a high wage, you have to be uniquely capable for the position.
On top of that, I think you're fighting an uphill battle because of your current position. Thinking like an interviewer, you being a junior working as the sole developer raises some real concern about the quality and readability of your work.
You may be able to refute those concerns, but maybe you're just good at debating. As an interviewer, I don't know that. All I know is that your position as a solo dev is different (pro: independent / con: lack of team-oriented experience) than a junior dev who already worked in close team connections.
Whether an employer values independency or team-oriented experience more, depends on the employer.
3. The company may have a different "normal".
Due to working remote, you have a better work/life balance. But at the company, everyone lives in/near that city, everyone commutes, and no one is considering asking for a raise to compensate the commute time, because they'd be commuting regardless of which company they'd work at.
In other words, if all companies in that city offer the same wage and suffer the same commute time, then employees in that city are going to see these offers as (local) market competitive, regardless of what you, outside of the city, in a remote job, earn.
4. The company may be naive about remote working benefits
If the company significantly underestimates the benefits of remote work, they're also going to undervalue them.
If the company doesn't even do remote work to begin with, and they're not in a sector where that is impossible (e.g. hospitality), then it's highly likely that the company doesn't particularly think it's an effective strategy, and likely doesn't see its value.
If they undervalue the benefits of working remote, they're going to offer a smaller wage bump to offset the loss of your remote working benefits.
5. You may have been taking your current wage and benefits for granted.
When you moved from working on-site to remote, did you take a pay cut to enable yourself to do so? Is this pay cut you took about equal to the pay raise you're now expecting?
Because you can't have it both ways. If you did not take a pay cut (or a smaller one than the raise you now ask) when you moved to working remote, you effectively gained added value, from having a better work/life balance, while retaining a proportionately higher wage than jobs with significantly worse work/life balances (due to commuting).
Simply put, shit jobs need a higher wage for people to want to do it. Conversely, fantastic jobs have less competitive wage pressure as the job itself is already desirable.
Similarly, just because you got a sweet deal on your last job offer doesn't somehow entitle you to getting an even sweeter deal for your next offer. For the sake of example, suppose you worked for an average wage, and then switched jobs to a company that pays above average for the same work.
If you now seek to leave that company in favor of a new employer, those prospective employers are not in any way required to offer you above average wages that match or exceed your current employer's wage. They will offer you what they're willing to offer you, and it's up to you to decide if that's good enough for you or not.
Them not offering you what you want them to offer you is a baseless complaint. You can't force them to offer something they don't want to offer.
6. If you can't find anything better, then clearly what you've got is very good.
If you cannot find any employers willing to offer you the same employment value (either in raised wage or work/life balance); then maybe you should count your lucky stars for the great position you're in now.
The odds of all of these employers making unfair offers is massively less likely than you having a skewed perspective of what a job in your current position should earn you.
Looking for a job entails looking for something you like (again, whether that's due to high wages, a fantastic job, a great work/life balance, ...).
If you don't find anything you like, then don't move jobs.
however I feel like I am missing out on some very important things like actually working together with experienced python developers on a shared code base
If you feel like working on-site is the way forward here, that means you have to evaluate your position differently. In such a case, working on-site would become the benefit, and working remote would be a negative.
But the ability to work on-site is entwined with commute times, and living in a geographically nearby area. That's a package deal. Either you like it, or you don't.
You have to make up your mind on what it is you want. Then you go look for the opportunities that fit your plan. Then you find the best offers on those opportunities. And then you decide whether any of these offers is good enough to take them up on.
It seems like you're stuck on the finding stage. This is an indication of there simply not being any jobs that suit your requirements. If that is because your expectations are too high, and if a job that fits your needs is going to pop up in the future, is nigh impossible to conclusively answer.