Something like this will do the job.
!/*/OUT
/*/
!/
A similar problem was discussed previously in https://forum.syncthing.net/t/adding-the-ignore-condition-only-files-can-be-deleted-but-folders-cannot-be-deleted/18305. The final ignore patterns there ended up being quite convoluted.