For me it would heavily depend on where the office is located relative to my apartment, and how long my commute would turn out to be. More than 15-20 minutes by bike is a no-go (I live in Europe).
Also assuming the requirement to be in the office isn't a huge red flag for bad management in the first place.
Well obviously the commute should be within a reasonable distance, I wouldn't spend 5 hours a day in a car or train for it.
But let's say the total time spend back and forth is about 1,5 - 2 hours total. I feel that's worth the time spend for a hypothetical double salary.
Obligatory presence in the office is indeed a red flag if it doesn't actually provide a benefit to the role.
To clarify, I'm 100% WFH in Denmark so I'm not advocating to push people into an office building but there's definitely a point where nearly everyone would go into the office full-time, if salary and benefits are high enough.