@ravz.sqldba, "Automatically remove agent history" option not remaining selected is a BUG which even I can reproduce. However when you select it and click ok, all data older than the selected duration (in your case 4 weeks) is deleted for one time.
Setting up a job which executed SP_PURGE_JOBHISTORY with the relevant parameters is a workaround.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga