It looks like it’s not possible. I have a late 2013 iMac and want to do the same thing. I got this from Macrumors forums, Connecting Mac mini to iMac as display
“ I have an older 2011 iMac running High Sierra that I still use for Target Display Mode. Works fine on my Intel (2019 16") MacBook Pro running Big Sur with a TB3->TB2 adapter, does *NOT* work on my new M1 Mac Mini. Cmd-F2 never switches to TDM, although System Information does show the Mini connected (I didn't test if Thunderbolt networking worked, but I don't know why it wouldn't.)”
“Same as mine - worked on 2015 MBP/Big Sur, but not on M1 Mini. So, it must be an M1 Apple decision - not Big Sur.”
Maybe an apple tech at Best Buy could confirm it.