If you have a good manager and good team no one should care about when or how you work, as long as you are productive and are available every now and again (perhaps a couple of times a week) to sync up or answer questions.
E.g. if work is not able to provide an environment conducive to thinking for large blocks of time, can you negotiate to work from home 2-3 days per week?
I have a similar problem at my work, I will be working from home today & will aim to spend most of the day at home with email and slack off. Lots of thinking and programming will happen.
When I am in the office it is sometimes possible to occupy a small meeting room for hours. If I have an afternoon without meetings I tend to try to hide in a room for noise & physical isolation from interruptions. Headphones and lyric free instrumental music work for me too.