I’m no expert, but …
But I want the source code to remain open source and publicly accessible on github.
But I think the organisation would want to hold the copyright to the finished website itself.
They can still have a copyright on the material and let you have a copy on github. It think they’re more worried about someone copying their website and using it as a web site. I’d explain to them that git hub is an industry standard and any front end work is easy to copy anyway.
Is it even possible that the finished product has a copyright to someone while the source code is open.
Sure. I can check out a book from the library but it is still copyrighted.
Also if we do go the closed source route, …
I think you are misunderstanding “closed source” - it doesn’t necessarily mean that the code is hidden, just that people are not free to edit it and come up with their one versions. All frontend code is “open” to the public (except for preprocessor stuff). That is not the same issue of whether or not you keep a copy on github or not. You can still put it on github with a tight licence statement.
how do I make sure I get the due credit? So that I can showcase my work to future employers?
You can still link to it on your portfolio page. Unless this is for some hidden site somewhere, they won’t object to a link to their page. Most organizations want as many links to their page as possible.
A big issue, is: Are you getting paid for this? If the answer is “yes”, then you definitely need to have a talk with them. I would explain to them. You will retain the copyright to the site and the information on it, but I will store my revisions on github (which is the industry standard) and there is nothing they can find there that they can’t already find by clicking ctrl-u on your page. I also agree not to reuse this page for future clients.
If they’re not paying you, then they’re being unreasonable - the chance to show off your work is why we do pro bono work for NPOs when we’re starting out in the first place.