### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

15, 16

### What operating system are you using?

Windows

### Operating System Version

Windows 10 19042.985

### What arch are you using?

x64

### Last Known Working Electron version

14

### Expected Behavior

Cookie setting succeeds

### Actual Behavior

It is no longer possible to set an insecure cookie
```
session.cookies.set({
	name: "testcookie",
	value: "testvalue",
	domain: ".testdomain.com",
	path: "/",
	url: "http://testdomain.com",
	secure: false,
}).then(() => {
	console.log("setting cookie success");
}).catch((e) => {
	console.error(e);
});
```
returns: [Error: Setting cookie failed]
Removing the "secure: false" returns: [Error: Cannot create a secure cookie from an insecure URL]


### Testcase Gist URL

https://gist.github.com/t57ser/a34dfe9579b856e6e765b59fb8d215cb

### Additional Information

_No response_
shell/browser/api/electron_api_cookies.cc
net::CookieSameSite* same_site) {
  if (!str_ptr) {
    *same_site = net::CookieSameSite::NO_RESTRICTION;
    return "";
  }
  const std::string& str = *str_ptr;
  if (str == "unspecified") {
    *same_site = net::CookieSameSite::UNSPECIFIED;
  } else if (str == "no_restriction") {
    *same_site = net::CookieSameSite::NO_RESTRICTION;
  } else if (str == "lax") {
    *same_site = net::CookieSameSite::LAX_MODE;
  } else if (str == "strict") {
    *same_site = net::CookieSameSite::STRICT_MODE;
  } else {
    return "Failed to convert '" + str +
           "' to an appropriate cookie same site value";
  }
  return "";
}
}  
gin::WrapperInfo Cookies::kWrapperInfo = {gin::kEmbedderNativeGin};
Cookies::Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
    : browser_context_(browser_context) {
  cookie_change_subscription_ =
      browser_context_->cookie_change_notifier()->RegisterCookieChangeCallback(
          base::BindRepeating(&Cookies::OnCookieChanged,
                              base::Unretained(this)));
}
Cookies::~Cookies() = default;