I'd recommend writing a simple version of your code (e.g. a small cli project) that only has the minimal parts of this that matter to the question. Removing the excess cruft can make it easier for people to be on the same page as you about the design choices you've made. Start with the simple version of this to show the issue, without trying to solve the problem by adding tasks etc.
To force the deadlock to occur deterministically, add sleeps at the points where you expect things to happen before / after and write the calling code so that those time waits make sense . I.e., put a 2 second wait in between the call and waiting for the response, but make the second call 1 second after the first to ensure that it happens in that gap.