Microsoft has fixed a bug in the Windows 10 version 2004 defragger that caused SSD drives to be defragmented too often. Microsoft has not fixed the bug that causes the Optimize Drives feature to perform the ‘Trim’ command on non-SSD drives, which do not support it. Windows 10 will defrag SSD drives once a month, but a bug would cause the Automatic Maintenance feature to forget when the last scheduled maintenance was run when Windows was restarted. Microsoft still has no official word from Microsoft regarding the TRIM bug, so we will have to wait on future updates.
Source: https://www.bleepingcomputer.com/news/microsoft/microsoft-fixes-windows-10-bug-causing-excessive-ssd-defragging/