There's almost certainly going to be differing procedures for each train company (and possibly different stock at that train company too), but consideration can be given to:
Why is the signal at danger? If it's for a train in the section ahead then slowing down and rolling in slowly could be a valid option but if it's red because of a fault or because the box wants you to call them then no matter how slow you come in it still isn't going to clear. If it's approach controlled if you're not close enough to activate it likewise it won't clear.
How long is your train? The car stop marker might be past the signal but - whilst operationally inconvenient - that doesn't necessarily mean that your train won't fit in the platform length available. Of course if you're DOO then position of monitors or mirrors becomes a consideration too, or in conventional operation are there restrictions on where the conductor needs to be on the platform?
What type of train are you driving? Is it fitted with one of these new-fangled systems that will throw a wobbly if you try to put up a door release in the wrong place on the platform? Is it slam door, in which case you really don't want to end up in a position where people are trying doors if you're then drawing forwards to the correct stopping point.
A combination of route knowledge, company procedures, and also professional experience will come into play with situations like this. If there's a particular location where this is a common problem, as was touched on before, there will be specific instructions about it (eg midplatform signals at Leeds, some TOCs allow the trains to be dispatched against a yellow - so the end platform signal is red - whilst some insist that the end platform signal is clear before dispatch begins)