Yes, it will work that way. All of those things make a difference. For example, a diesel sub, operating on batteries and going real slow, can be a real challenge to fund. By hiding just above the layer and going slow, the towed array will droop below and be able to hear things from great distanceswithout any interference.
I would suggest doing this just for fun: Place a sub in the ocean and then place various subs within (or close to) a distance where it could possibly detect the first sub. Place you first sub below, then above, then in, the layer. Use a constant speed and direction. After that, check with the second sub. Did it detect the first sub? Play it numerous times to see when the first sub is detected. Do it with several subs each with different listening equipment, each with a different depths.
This can be beneficial for you using various tactics when you play the game. Some subs are better, and some are worse. A lot depends on the two subs themselves. Some might be able to hear this, but not that. But, if you will do this, you will see that being in the layer changes things. It makes it more difficult. Being a sub driver is different than planes. Planes don't have to deal with layers. <lol>
Test it, and see what develops. It will help you. It's hard to actually go into battle without knowing what you can reasonably expect to happen.
I almost forgot. The BEST way to learn about subs, and their actions in this game, is to view the sub tutorials. They are the best! If you haven't already done this, I encourage you to check them out. Depending on your familiarity with CMANO, these can really help you to understand sub warfare, and give you a slid basis for game actions.