You can work but not PAYE you can only do self employed type work where you don’t pay tax at source.
Are you receiving maternity allowance or smp? If it’s maternity allowance you cannot even do self employed work. You can only do 10 KIT days otherwise you’re maternity pay will be cancelled.
You can’t work if on maternity leave. Especially if it’s the one from the government