Can't make changes with _theme.less

To take effect new changes, first of all, you should delete your var/view_preprocessed/pub and pub/static/frontend folders and files using below command :

rm -rf pub/static/frontend/ var/view_preprocessed/pub/

After that you should deploy your static content :

php bin/magento setup:static-content:deploy -f

then you would see changes you made in _theme.less file.

However, I would recommend you should extend styling using _extend.less, because if you want to use _theme.less file then, first of all, you have to copy all styling which is in Magento luma _theme.less file. And if in future that file changes then you should again copy all content of Magento luma _theme.less file into your _theme.less file.

so the recommendation is to use _extend.less. But in your case above commands will solve the issue.