why does it matter which format we are using?
Because for different address types, you have different ways of calculating message hash. Also, for different sighashes, there are different steps to process the transaction. Even if you know that your message hash is "SHA-256(something)", that "something" is different for different address types, so you need different code to process it, if you want to get it from scratch. The simplest one you can start with is "Bitcoin Signed Message", because then you need to take your message, and prefix it with some data, and then it is ready to be hashed.
I guess the easiest way is to extract the k from p instead of trying to find another way.
You mean extracting "k" from "r"? That way or another, if you know "k" or if you know the private key, then you can get everything, and you have full control, but the problem is: going from public to private key is hard, you can do that only if such key is non-random. But: even if getting message hash is not as simple as getting txid, it is always possible, because you need that message hash to validate any transaction, by using public keys.
does it matter whether you use your public key to sign a transaction or to sign a message?
Yes, because your signature is attached to what you signed.
message="Hello World"
address="1psPJZYEJrjPtY6kw5Tqtj4mW2yXSSDuH"
signature="GwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE="
Here, you have an address, where people can calculate the public key, but nobody knows the private key. Another example is testnet transaction 3952b35bde53eb3f4871824f0b6b8c5ad25ca84ce83f04eb1c1d69b83ad6e448, where you can see this signature: 300602010102010103. As you can see, in both cases you have r=1 and s=1, but there are completely different public keys in use. This is because the message hash in each case is calculated in a different way. For that reason, if you take that 032baf163f5e27261ab3228e61fb86dc98054abd514751fce93d7444e8fbc6a293 public key from testnet transaction, and you convert it into Segwit for the mainnet, you will reach bc1qmp2zyz9tucw7vh599hl3cvyhdm5c6zfvlmfl02. If it would be legacy address, you could try to move it in the same way, as it was moved on testnet, because it uses SIGHASH_SINGLE bug. But because it is Segwit, those coins are burned on mainnet, because the message hash is calculated differently for Segwit addresses.
do we also reveal just the p when we sign a message or something else could be revealed as well?
You reveal your public key, your (r,s) signature, and your message, which after hashing should pass ECDSA verification.