No, they cannot
They are relying on this single line of Detect Evil for their plan:
Creatures with actively evil intents count as evil creatures for the purpose of this spell.
However, this isn't an exception, this is an addition to what should be detected by the spell. Doing good actions would probably allow them to ping inside the effect of Detect Good, but doesn't exactly prevent them from being detected as evil unless their alignment actually changes as well.
They have to change their alignment before they are able to fool Detect Evil. Either that or use other means of fooling the spell (which I suppose you are well aware of). But merely doing good actions won't have a change on their alignment, unless those actions were enough to warrant an alignment shift, which is entirely is your decision as GM.
The game doesn't leave you helpless there, though, it actually has some guidelines, which are optional rules from Champions of Purity, that details (with rules) how to convert an evil creature towards good, and says:
Simply committing a series of good acts is not enough to change a creature’s alignment—it must want deep down within itself to be good.
I won't quote all the text, only the relevant mechanical value of it, but here are the important bits about trying to move away from evil according to the book:
Penances: To pass through each stage of its path to good, a creature must perform a number of good deeds equal to double its total Hit Dice. The GM decides exactly which penances are appropriate, but examples of such acts are included below.
When a creature completes the penances required for a stage, it must succeed at a Will save to overcome its nature. The DC of this save is equal to 10 + 1/2 the creature’s total Hit Dice + its Charisma modifier. If this save is successful, the penances have taken hold and the creature has completed another step toward becoming good. If the creature fails this save, it must complete another deed in order to gain a chance to attempt another save. It can continue to complete additional deeds after each failed save until it succeeds.
And here is a small list of deeds that count as a single penance for their quest to goodness:
- Confessing your past sins or evil acts to an appropriate good-aligned agent.
- Healing a creature you don’t know from a disease, affliction, or poison when doing so gives you no personal advantage.
- Willingly submitting to a geas/quest, mark of justice, or similar spell to show you are committed enough to the process of redemption to
risk harm if you fail.
- Casting a spell with the good descriptor. This penance can be completed only once per stage.
- Donating at least 50 gp to a good organization or faith. Each time you do so, the amount needed for the donation to qualify as a penance
- Sacrificing belongings gained through evil means.
- Freeing an oppressed, enslaved, or abused creature.
- Preaching a sermon of no less than 1 hour on the virtues of good behavior. This penance can only be completed once per week.
- Turning a creature that has committed a crime over to a good-aligned authority.
- Completing a task or quest for a good faith or organization without accepting payment. A GM may decide that a particularly challenging
encounter may count as two or more penances.
- Fasting and praying for 12 hours (leading to fatigue).
- Creating a good item and giving it away for free.
- Showing mercy to a vanquished foe.
- Completing a task for a stranger and accepting no reward.
- Refraining from blasphemy or bad language in private or in conversation with others.
- Instructing other characters or NPCs in pure courses of action.
- Ignoring or not responding to insults or challenges from foes.
- Attempting a Diplomacy check to try and resolve a situation peaceably instead of resorting to combat.
- Refraining from lying or deception for an entire week.
A special note is required here: Casting [Good] spells can shift your alignment. Just like casting evil spells can change your alignment to evil, you could cast spells with the [good] descriptor and shift your alignment to neutral (and then good). But this can only be done once per stage (evil -> neutral then neutral -> good), meaning that multiple casts of Protection From Evil isn't enough to shift you away from evil.
If they are 5th level, that means they will need at least 10 penances before they are allowed their Will check (against a DC of 12 + their charisma bonus) to change their alignment. A first level character would need to do two penances before they are allowed a Will check, and failing it would require another penance before they are allowed to try again.
But any evil acts during that process will count against their goal (see Relapses).