Copy yesterday's daily backup to weekly / monthly retention BEFORE running today's
At present, the daily backup will look at the dates that the last weekly or monthly backups were run, and work out whether either of them is due today.
If both of them are, weekly takes priority while monthly waits until the following day. That is key: It stops the weekly and monthly backups being for the same date, so that you always have both of those independently to restore to.
However what then happens is that the daily backup is run, and (if necessary) the resulting backup is copied to the weekly / monthly folder.
Suppose someone has their site set up just to retain weekly backups. On the day after their weekly backup has run, they only have one backup of each account, because the weekly backup has been overwritten with today's daily, so the daily and weekly backups are the same. In a similar vein, if someone has both weekly and monthly retention set, they have 3 different backups except for on a day when the weekly or monthly backup has been stored; on those days, they only have 2, because the daily backup will be the same as one or the other.
There is a very simple way to improve this: Instead of copying the daily backup folder to the weekly or monthly one AFTER running today's backup, do it before. That way, just after a weekly backup has been taken, the weekly backup will be yesterday's, and the daily one will be today's. Now there are no longer days of the week or days of the month when there is one fewer backups.