I was in a somewhat similar boat. I was a .NET developer that wanted to try something new, and despite eight years of experience few people wanted to take a chance on someone. I managed to find a role doing Ruby, and I've managed to transition to a new stack and language fairly well.
The only roles where I had any real bite were the ones where I applied directly, and where the person on the other end of the table from me was a developer. To highlight the issue, the second I had Ruby on my CV after taking this role, the same companies that wouldn't hire me for a mid-level role wanted to offer me an interview for senior-level roles...
Student/Teaching -> Security/Operating Systems -> Programming Languages -> Data Engineering -> Image Processing -> Machine Learning -> Language Processing -> Audio Processing -> Full Stack Development -> ?
(sprinkled part-time teaching positions throughout)
Often this cost me in pay, but usually had good other benefits. I worked for smaller companies, government work/contractors, independent contracting, prototypes whenever possible. Many companies advertise themselves as polyglots (this can help measure the culture you're applying into).
Changing domains dramatically will often result in changing technologies. Signal processing is often done in Matlab, Full stack has a very diverse set of technologies, but different combination at every company. Different applications of statistics have very different preferred technologies.
You have to get real comfortable with being the dumbest person in every room. Eventually you can end up on top, but for your first several opportunities can reset major parts of your market value.
Its a long game. Now my market value is my diversity. It took a lot of resets to get there. There are some recruiters/Hiring managers that don't like this, but there are just as many who do.
Apply based on your ability to contribute to Java projects but communicate you’re intent: that you’re enthusiastic about Python and want to make the transition.
When it comes time for them to staff up on Python projects, you’ll be more of a known quantity than any outside applicant. That’s worth a lot.
There will be a risk that you’ll be stuck in Java work, but you just need to stay clear on what you want and be ready to move on again if they make a habit of ignoring that. You don’t want to stay somewhere that would ignore your career ambitions like that anyway.