I accidentally sent funds to a contract address.
A contract address is different than a normal address (What are addresses?) in the sense that with the latter, it is controllable by anyone with access to its private keys (or other backup methods such as the mnemonic phrase, JSON file, etc.). A contract address, on the other hand, does not work that way. It can only execute or carry out functions that are written into its source code and it is not controllable like a normal address because it does not come with a private key.
That said, with a normal address, if an asset was wrongly sent to it, the owner of the receiving address can send it back to the sender as long as he/she has control of the address (via the private key). However, with a contract address, this is likely not possible. As it can only operate within its functions, the contract creator/address may not be able to do anything if an asset was wrongly sent to the contract address - unless, of course, the contract address has a specific function in its source code that allows it to transfer received tokens.
However, it is always best to contact the contract's deployer or team members for further assistance or a definitive solution for the issue as they are more knowledgeable in this subject matter and are in a better position to assist you.