Have you ever been lectured about pricing? Or do you have to work for a fixed fee that you didn’t negotiate? I’ve done both. The benefit of being self-employed is that you can set your own prices. Of course, you might have a client who wants to negotiate but ultimately it’s up to you whether you take the work or not.
The truth is that dealing with either situation requires proper planning. That could be at the beginning before you issue a quote. Or you might have to do it when you’re presented with a task that has a time and/or cost limit imposed.